Can any body plz explain this?

hi all,
I has to write a program in java for converting Excel to PDF...I got this code...but i'm clear with wht is happing here,,,and in this code they used apache.fop...i'm not able to find fop api's. plz help me out.....
public static void main(String args[]) {
     try {
          ByteArrayOutputStream fopout=new ByteArrayOutputStream();
          FileOutputStream outfile=new FileOutputStream(args[2]);
          Driver driver =new Driver();
          driver.setOutputStream(fopout);
          driver.setRenderer(Driver.RENDER_PDF);
          Transformer transformer=TransformerFactory
          .newInstance().newTransformer(new StreamSource(new File(args[1])));
          transformer.transform(new StreamSource(new File(args[0])),
          new SAXResult(driver.getContentHandler()));
          PdfReader reader = new PdfReader(fopout.toByteArray());
          int n = reader.getNumberOfPages();
          Document document = new Document(reader.getPageSizeWithRotation(1));
          PdfWriter writer = PdfWriter.getInstance(document, outfile);
          writer.setEncryption(PdfWriter.STRENGTH40BITS, "pdf", null,
          PdfWriter.AllowCopy);
          document.open();
          PdfContentByte cb = writer.getDirectContent();
          PdfImportedPage page;
          int rotation;
          int i = 0;
          while (i < n) {
          i++;
          document.setPageSize(reader.getPageSizeWithRotation(i));
          document.newPage();
          page = writer.getImportedPage(reader, i);
          rotation = reader.getPageRotation(i);
          if (rotation == 90 || rotation == 270) {
               cb.addTemplate(page, 0, -1f, 1f, 0, 0,
               reader.getPageSizeWithRotation(i).height()); }
          else {
               cb.addTemplate(page, 1f, 0, 0, 1f, 0, 0);
          System.out.println("Processed page " + i);
          document.close();
     catch( Exception e) {
          e.printStackTrace();
regards
[email protected]

Okay. I think we've been here before.
How far have you got so far?
When you say "excel" do you really mean an "MS excel" file or do you mean a CSV file?
What are you using to read the excel file at the moment? Are you reading the excel file yet? Do you need to do anything with the data in the excel file? Do you have the option to retrieve the data in any other format?
What should the pdf file look like?
Please, take the time to explain your problem and circumstances. Just telling us "tell me wht is the solution for this task" doesn't cut it, "Plz " or no "Plz ".

Similar Messages

  • Can any body please read this and ans me

    hi all,
    can any body please read this and tell is there any function module or some other thing is available.
    Material masters are location specific, and Progistix maintains part details in Canadian $, now we need to get the logic how SAP converts the standard cost of the material from Canadian $ to US $
       The plant number of Canada is 3002.

    Hi
    you would have to use the following function modules
    CONVERT_TO_LOCAL_CURRENCY
    CONVERT_TO_FOREIGN_CURRENCY
    regards
    Dinesh

  • Can any body please explain the hr payroll process  in detail

    Hi Experts,
                      I am newbie to HR abap.Can any body give their valuable experience regarding payroll proces in hr.
    Thanks and Regards,
    Sravanthi.

    Check this out,
    payroll
    Re: payroll material
    Hope this will help.
    ashish

  • Can any body plz tell me the solution for IDOC Import

    When iam trying to import the IDOC --> PREQCR.PREQCR02 to my imported objects in Integration Repository by using Application Server, system number and user name and password, the following error iam getting.                                                                               
    PREQCR.PREQCR02: Error
                                         + Error: IDoc type PREQCR02 contains errors (unable to read segments)
    Import failed with 1 error.

    Hi Abullah,
    R u trying this on R/3 5.0,
    try importing PREQCR02 in R/3 4.7, It gets imported successfully..
    Or else contact u r Basis person if u want to use R/3 5.0
    Regards,
    Sridhar

  • Can any body tell whether this logic will work or not

    To calculate quantity for the  material  for  particular month
    This report is used to calculate demand plan(zzdpfc) for market 001 and 002
    eg: the opt shld be
      material number           month              quantity
    1.  1000                           02/2007              40 (market 001+002 for the same      materila and same month)
    2. 1000                          03/2007               20 (same as above)
    3. 1001                           02/2007               30 (same as above)
    i want to know whether  this pgm will work according to this requirement or not .if not please change the code accordingly .please let me know it urgent.
    REPORT  ZPRODUCT_ROLL                           .
    TableS: S507.
    DATA: BEGIN OF T_DATA OCCURS 0,
           matnr LIKE S507-matnr,
           SPMON LIKE S507-SPMON,
           ZZDPFC LIKE S507-ZZDPFC,
           ZZMARKET LIKE S507-ZZMARKET,
           END OF T_DATA.
    DATA:WA_DEMPLAN(10) TYPE C.
    data:material(18) type c.
    data : period like sy-datum..
    period =  sy-datum+0(6).
    Select    mATNR SPMON ZZDPFC ZZMARKET
    From S507
      into corresponding fields of  table  t_DATA WHERE
      VRSIO = '000' AND BEDAE = 'KSV' AND ZZDMTYP = '001'
      AND  ZZDPFC GT '0' AND ZZMARKET IN ('001','002').
    AND SPMON >= PERIOD.
       SORT T_DATA BY MATNR SPMON.
    write:/04 'Material',25 'Demand Plant', 50 'Period'.
    LOOP AT T_DATA.
    move t_data to material.
    modify t_data.
    *WRITE:/02 t_data-MATNR ,25 t_data-ZZDPFC,45 t_data-ZZMARKET,
    *70 t_data-SPMON.
    at new spmon.
    sum.
    write : /02 material color 5,25 t_data-zzdpfc COLOR 5 ,50 t_data-spmon color 5..
    endat.
    endloop.

    hi arun,
    use collect keyword in the loop, it add the quantity fields for the particular material
    or
    use control brake statement in the loop and endloop.
    regards,
    seshu.

  • Can any body explain me this query?   select 'alter index '||index_name||' monitoring usage' as index_monitor from user_indexes where index_name='EMP';

    Initially i've a put an index of emp table in monitoring state..
    later i've got this query
    select 'alter index '||index_name||' monitoring usage' as index_monitor from user_indexes where index_name='EMP';
    can any body explain me what is the meaning of this query...
    and how do that query in the strings of projection area works....
    i'm totally confused
    thank you in advance.

    This is referred to as SQL generating SQL.  It is most useful when you  need to generate SQL statements for all indexes or indexes for one user.  After generating the text you then would execute it in SQLPlus or the tool of your choice.  If you combine this with a spool statement, SPOOL MyGeneratedScript.SQL you can run it with @MyGeneratedScript in SQLPlus.  I combine this into a script which generates the file, calls the editor so you can look it over and then executes it.  Here is an example of moving indexes to a different tablespace.
    -- UTL_Move_Indexs_To_New_TableSpace_Script.SQL
    /* This script will grab all the tables out of the specified source tablespace
    ** and move them into the specified target tablespace.  Ensure the the target
    ** exists and has sufficient room.  You must be logged in as the table owner.
    ACCEPT v_source_tablespace_name PROMPT 'Enter source tablespace name: '
    ACCEPT v_target_tablespace_name PROMPT 'Enter target tablespace name: '
    SET HEADING OFF
    SET FEEDBACK OFF
    SET TERMOUT OFF
    SET ECHO OFF
    SPOOL _move_index.SQL
    SELECT    'ALTER INDEX '
           || ndx.owner
           || '.'
           || ndx.index_name
           || CHR (10)
           || 'REBUILD '
           || CHR (10)
           || 'TABLESPACE '
           || UPPER ('&v_target_tablespace_name')
           || ';'
             sql_statement
    FROM   dba_indexes ndx
    WHERE      ndx.tablespace_name = UPPER ('&v_source_tablespace_name')
           AND ndx.index_type <> 'LOB'
    ORDER BY ndx.owner,
             ndx.index_name;
    SPOOL OFF
    --Edit the move script
    EDIT _move_index
    --Reset parameters.
    SET TERMOUT ON
    PAUSE Hit Ctrl+C to ABORT, any key to CONTINUE,
    -- Run the move script
    SPOOL  Move_Indexs_To_New_TableSpace.LOG
    @_move_index
    SPOOL OFF
    --Reset parameters.
    SET TERMOUT on
    SET FEEDBACK on
    SET HEADING on
    Marcus Baocn

  • CAN ANY BODY EXPLAIN THESE QUESTIONS, VERY URGENT

    WHAT IS THE USE OF CHAPTER ID, IN CHAPTER ID RATES    WILL  BE   DETERMINES.
    HOW MANY TAX CODES NEED CST, LST.
    WHERE CAN I SEE EXCISE REGISTER
    WHAT IS MEANT BY RG1 CAN ANY BODY EXPLAIN BRIEFLY, WHAT IS THE USE OF RG1
    HOW DO I GET OPENING BALANCE FOR EVERY MONTH.
    IN DEPOT SALES, IF CREATING  EXCISE INVOICE A CERTIFICATED WILL ISSUE, IN A CERTIFICATE WHICH FIELDS WILL BE THERE.
    WHAT IS MEANT BY JURISDICTION CODE & COUNTY CODE.
    IN SD FACTORY SALES WHICH A/C ENTERIES GENERATED.
    CAN ANY BODY EXPLAIN THESE FORMS, WHICH SITUATION THESE FORMS WE ARE USING.  I NEED VERY URGENT.
    a) A form
    b) D form
    c) C form
    d) H form
    e) DDP form
    f) TR6 form
    g) D3 form.
    H) ARE.
    I) ARE 1
    j) ARE 2
    IN DEPOT SALES PRICING PROCEDURE JFACT, WHICH CONDITION TYPES  WILL COME,
    IN FACTORY SALES PRICING PROCEDURE JFACT, WHICH CONDITION TYPES WILL COME
    NOW WHAT IS THE VAT TAX.
    what is the use of common distribution channel and common divisions
    PLS FORWARD ANSWERS TO THIS MAIL ID.
    i hope that definitely people will help
    thanks every body.

    Dear vara prasad
    You can take it for granted if you post so much questions in one thread like this, nobody will answer / clarify you.
    So please make one thread per question.
    Meanwhile, just I would like to clarify for few questions
    1)  The most important feature of chapter id is that based on this chapter id which you maintain in "Excise Tax Rate",  all your excise tax rates will be flowing into your sale order / billing
    2) If the rate of tax differs, then you need to maintain a separate tax code.  For example, the LST / VAT in some state is 4%, and in some state it is 12%.  So in this case, you need to maintain two tax codes
    thanks
    G. Lakshmipathi

  • Hi,  can any body explain the concept of UTILIZATION IN EXCISE

    hi,
    sap gurus,
    can any body explain the concept of Utilization in excise,  if possible send me the documentation
    part of that please.
    please explain me on this also
    in direct factory sales from direct factory to customer how utilisation works
    in depot sales: first material has to reach from factory to depot and then it has to be passed to
    customer then in this situation  how utilisation works in SAP.
    regards,
    balaji.t

    Dear balaji
    Export under Rebate is the procedure in which the exporters first pay the central excise duty before clearing the goods from the factory and subsequently get it back by applying for rebate after the goods are exported.  They have to apply to the Division or to the Maritime Commissioner (designated exclusively to look after all Export related issues) as the case may be, along with the required documents (usually the Export Promotion copy of the Shipping Bill and Bill of Lading) to prove that their goods had actually been exported.  
    Rebate can be claimed for both the inputs (purchased from indigenous markets and used in the manufacture of exported goods) as well as for the final products.  Normally, rebate is being widely opted by non-excise assessees (for example garment exporters) who procure raw materials locally, manufacture their final products and export them.   It is similar to Drawback of Customs duties in respect of Imported raw materials. 
    From SD side, you have to make settings in Logistics-General --> Tax on Goods Movements --> India --> Business Transactions --> Outgoing Excise Invoices --> Maintain Default Excise Groups and Series Groups.
    Here for the combination of sales area, shipping point, plant, excise group and series group, you have to maintain Export type [N under the tab Export]
    thanks
    G. Lakshmipathi

  • Can any body explain the STO Process

    hi,
    sap gurus,
    good morning to all,
    can any body explain the PLANT to STORAGE LOCATION stock transfer single and two
    stepProcess in detail.
    regards,
    balaji.t
    09990019711.

    Hi,
    Stock Transfer Between Plants in One Step
    Use
    This type of stock transfer can only be carried out in Inventory Management. Neither Shipping in the issuing plant nor Purchasing in the receiving plant is involved in the process.
    Transferring stock in one step has the following characteristics:
    The stock transfer is entered as a transfer posting in Inventory Management.
    The transfer posting can be planned by creating a reservation.
    The quantity of the stock transferred is posted immediately from the unrestricted-use stock of the issuing plant to the unrestricted-use stock of the receiving plant
    The transfer posting is valuated at the valuation price of the material in the issuing plant.
    If the plants involved belong to different company codes, the transfer between plants is also a transfer between company codes. In this case, the system creates two accounting documents for the transfer posting. The stock posting is offset against a company code clearing account.
    Stock Transfer Between Plants in Two Steps
    Use
    This type of stock transfer can only be carried out in Inventory Management. Neither Shipping in the issuing plant nor Purchasing in the receiving plant is involved in the process.
    The stock transfer includes the following processes:
    A goods issue in the issuing plant
    A goods receipt in the receiving plant
    Transferring stock in two steps has the following characteristics:
    The transfer posting cannot be planned by creating a reservation.
    The quantity posted from stock is first of all managed as stock in transfer in the receiving plant. Only once the goods receipt has been posted is the quantity posted to the unrestricted-use stock of the receiving plant.
    This enables the quantity "on the road" to be monitored.
    The transfer posting is valuated at the valuation price of the material
    pl check for more info [STO|http://help.sap.com/saphelp_47x200/helpdata/en/4d/2b90dc43ad11d189410000e829fbbd/content.htm]
    regards
    sadhu kishore

  • Can any body explain real time confiruration in sd,mm module plssssssss

    can any body explain real time confiruration in sd,mm module plssssssss

    SD MM
    Flow of SD & MM
    SD and MM Flow with diagrams
    bussiness flow of sd and mm
    sd and mm flow
    SD FLOW AND MM FLOW
    Re: reg : document flow for SD and MM ?
    http://www.sapgenie.com/abap/tables_sd.htm
    Please check this SD online documents.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAARCSD/CAARCSD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MYSAP/SR_SD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSD/BCBMTWFMSD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/LOLISPLN/LOLISPLN.pdf
    Also please check this SD links as well.
    Rewards if useful.........
    Minal
    http://help.sap.com/saphelp_47x200/helpdata/en/92/df293581dc1f79e10000009b38f889/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/dd/55f33e545a11d1a7020000e829fd11/frameset.htm
    http://www.sap-basis-abap.com/sapsd.htm
    http://www.sap-img.com/sap-sd.htm
    http://www.sapgenie.com/abap/tables_sd.htm
    http://searchsap.techtarget.com/featuredTopic/0,290042,sid21_gci961718,00.html
    http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/SD_tutorial.html
    All help ebooks are in PDF format here
    http://www.easymarketplace.de/online-pdfs.php
    for mm
    http://www.sapgenie.com/abap/tables_mm.htm
    http://www.sap-img.com/sap-download/sap-tables.zip
    http://www.allsaplinks.com/material_management.html
    http://www.training-classes.com/course_hierarchy/courses/2614_SAP_R_3_MM_Invoice_Verification_-_Rel_4_x.php
    http://www.sapfriends.com/sapstuff.html
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSMAT/PSMAT.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAARCMM/CAARCMM.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MYSAP/SR_MM.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/LOMDMM/LOMDMM.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMMM/BCBMTWFMMM.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MMIVMVAL/MMIVMVAL.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MMWMLVS/MMWMLVS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MMISVE/MMISVE.pdf

  • On my macbook pro when opening a page i can not save it as a pdf only give me the option of saving it as a web page can any body help me on this I have tryed so many times without success

    on my macbook pro when opening a page on safaryi can not save it as a pdf only give me the option of saving it as a web page can any body help me on this I have tryed so many times without success?

    Just select Print in Safari and then, in the bottom left-hand corner, select PDF and you can save it to whichever flavor pdf file you like.
    Clinton

  • Can any body explain me JSF Page Life Cycle?

    Hello All
    Can any body explain me JSF Page Life Cycle?
    I wanted to know basically following few things
    1. how the JSF component will be rendered to html
    2. How the ValueBinding and MethodBinding mechanish works
    3. On conditional situation, if we need to generate the page dynamically with the various components, then what is the role of ValueBinding mechanism?
    4. What happens once the page is rendered?? In other words, does the FacesContext instance holds the object information in cache or sends it to garbage collector??
    5. Other than ValueBinding mechanism does we have any other procedures to bind the beans to components , when dynamic controls generation situation arises??
    Thanks
    Sudhakar Chavali

    Thanks Giri, for your continuous support
    Basically I get these doubts because I am not able to get right response from Java Server Faces when I communicate between Non_JSF and Jsf Pages
    please have a look on following links. Where I need your support
    http://swforum.sun.com/jive/thread.jspa?threadID=54347&messageID=208120#208120
    http://swforum.sun.com/jive/thread.jspa?threadID=54379&messageID=208222#208222
    Thanks
    Sudhakar

  • Can any body explain the process of "how to sell the goods under loan"

    hi,
    sap gurus,
    can any body explain the process of "how to sell the goods under loan"
    and its further process.
    regards,
    balaji.t
    09990019711

    Hi,
    I didnt get your question fully, but
    Please refer the folowing link
    http://help.sap.com/saphelp_banking463/helpdata/en/09/7cba34e465b73ee10000009b38f83b/frameset.htm
    Thanks,
    Raja

  • Can any body explain me what is " silos"

    hi
    can any body explain me what is " silos"
    akhil

    Hi Akhil,
    Please go through these links:
    1. An information silo is a management system incapable of reciprocal operation with other, related management systems. A bank's management system, for example, is considered a silo if it cannot exchange information with other related systems within its own organization, or with the management systems of its customers, vendors or business partners. "Information silo" is a pejorative expression that is useful for describing the absence of operational reciprocity. Derived variants are "silo thinking", "silo vision", and "silo mentality".
    http://en.wikipedia.org/wiki/Information_silo
    2. Storage silos are structures for storing bulk materials. Silos are used in agriculture to store grain (see grain elevators) or fermented feed known as silage. Silos are more commonly used for bulk storage of grain, coal, cement, carbon black, wood chips and sawdust.
    Three types of silos are in widespread use today:
    1.Tower silos
    2. Bunker silos
    3. Bag silos
    http://en.wikipedia.org/wiki/Storage_silo
    3. http://blogs.ittoolbox.com/crm/cdi/archives/master-data-silos-and-rocknroll-7686
    4. Get in-depth insights into Application Silos!
        View as PDF
    http://manageengine.adventnet.com/products/applications_manager/application-silos.html
    Please rewards if found helpful.
    Regards,
    Alok Sharma

  • Can any body answer this-Want to set the cursor position in textfield.

    i want my cusor position in textfield at the initial position which will come by default.
    but when i'm using the textfields in an inner class i'm getting the cursor position at the end of the text in text filed.pls can any body answer this.
    thanks in advance.
    if want run this example.
    import java.awt.*;
    import java.awt.event.*;
    class Testing extends JFrame implements ActionListener
         Container cnt;
         JButton jd;
         JTextField jt1;
         JTextField jt2;
         Testing()
              cnt = getContentPane();
              cnt.setLayout(new FlowLayout());
              jd = new JButton("OK");
              //jd.setBounds(50,50,100,30);
              cnt.add(jd);
              jd.addActionListener(this);
         public void actionPerformed(ActionEvent ae)
              Object but = ae.getSource();
              System.out.println("in action 00000");
              if(but.equals(jd))
                   System.out.println("in action ");
                   call();
                   return;
         void call()
              System.out.println("in action 1111111111");
              Inner inn = new Inner();
              inn.jdlg.show();
         public static void main(String s[])
              JFrame jf = new Testing();
              jf.setSize(200,200);
              jf.show();
         class Inner
              JDialog jdlg;
              //JTextField jt1;
              //JTextField jt2;
              Container cnt;
              Inner()
                   jdlg = new JDialog();
                   JLabel jla = new JLabel("Label");
                   jt1 = new JTextField();
                   jt2 = new JTextField(5);
                   cnt = jdlg.getContentPane();
                   cnt.setLayout(new FlowLayout());
                   cnt.add(jt1);
                   cnt.add(jt2);
                   jt1.setText("aaaaaaaa");
                   jt2.setText("bbbbbbbb");
                   System.out.println("the text "+jt1.getText());
                   jdlg.setSize(200,200);

    JTextFiled.setCaretPosition(0);

Maybe you are looking for