Create pdf file dynamically using XML

Hi Experts,
I have a Webdynpro application where I want to print the data for 'N' number of employees using adobe interactive forms. I have designed the form for one employee. I want to use the same format for the rest of the employees. Can any body please guide me how to go about this.
Regards,
Abdullah

In your context , create a node <b>MasterNode</b> of cardinality <b>1...1</b> and <b>singleton</b> set to <b>true</b>. Bind this to the <b>dataSource</b> property of the <b>InteractiveFormElement</b>.
Inside this <b>MasterNode</b> create a node <b>Data</b> of cardinality <b>0...n</b> and <b>singleton</b> set to <b>false</b>. Keep all of your payslip attributes inside this node.
In your interactive form element , in the Body Page create a subform of Type <b>Flow Content</b> and Flow Direction <b>Table</b> .Check the chechbox  for <b>Allow Page Breaks within Context</b> . Inside this subform create another subform of Type <b>Flow Content</b> and Flow Direction <b>Western Text</b> . Uncheck the checkbox for <b>Allow Page Breaks within Context</b> . Put all of your pay slip UI elements inside this subform and bind them with the attributes under the node Data. Also tick the property of the inner subform under the section Object->Subform that says <b>Repeat Subform for each Data Item</b>
In your view controller coding area , create an element of the node Data for each employee record and populate it with values for the particular employee .  
Add all of the elements that you created into an ArrayList and bind this ArrayList to the node Data. Now your form is ready for n number of employees.
Put this sort of coding in your view controller coding:
IDataElement objData = null;
ArrayList arlData = null;
int intNumberOfEmployees=0;
try
        arlData = new ArrayList();
        intNumberOfEmployees = //Get size of your model node that returns employee info
        if(intNumberOfEmployees>0)
                for(int i=0;i<intNumberOfEmployees;i++)
                        objData  = wdContext.createDataElement();
                        objData.setName("//Value fetched from backend here");//Eg:wdContext.nodeEmployeeInfo.getEmployeeInfoElementAt(i).getname()
                        //Similarly set all of the values
                        arlData.add(objData);
        wdContext.nodeData.bind(arlData);

Similar Messages

  • How to create pdf files dynamically using Java

    I am new to java world. I got a task of generating dynamic pdf files using Java. I have tried with some third party APIs for generating pdf. But most of them are not so feasable. I am looking for source code for one such APIs so that I can build my custom requirements over it.
    Thanks

    I am new to java world. I got a task of generating
    dynamic pdf files using Java. I have tried with some
    third party APIs for generating pdf. But most of
    them are not so feasable. Which ones? What was wrong with them?
    I am looking for source
    code for one such APIs so that I can build my custom
    requirements over it.What are your exact requirement?

  • Generate PDF Files Dynamically Using XSL-FO

    Hi,
    I have downloaded the strutscx sample application and helped me lot in generting a PDF report and quite comfortable with that.
    But we have webapplication where in we dynmically need to generate a PDF report. But the data is really huge. So I have decided to write a offline to generate many PDF reports and save it to a file system. In the (struts)webapplication when I click on that link I will read that pdf file and display/open in browser. So basically I need to have all the .pdf files in the filesystem.
    Can somebody help me as to how to create and save a pdf file into filesystem using fop. Please help as this is really urgent for me.
    A sample code would be really helpfull for me.
    Kindly do the needfull.

    The information in this link:
    http://xmlgraphics.apache.org/fop/examples.html
    may be of some use to you. By the way, it was the first link that was returned when I put the keywords "fop examples" into Google. You might want to consider searching the web for information rather than waiting for personal service.

  • Create Crystal Report Dynamically using XML based design metadata

    Hi,
    I have a CR Report Development environment. Please refer to workflow and requirement description below;
    I have a Java application(Report Customization Tool), which allows users to dynamically select structure and content for a report.
    The process goes as follows:
    1. In Java Application, user first gets option to select Report Header, Page Orientation, Font etc for master report.
    2. User can select a sub-report (pre-developed report frames. Not Sure about tool.) and apply the same format option (mentioned in step 1, except orientation) to it.
    3. User can select individual row/data cell to be displayed on the report through reference to DB tables in sub-reports.
    4. There can be N number of sub-reports each with independant formatting, data and data layout that could be integrated in single report.
    5 Once all selection is done, Java code generates an XML with all this info.
    Now, my requirement is dynamically write CR report based on this XML. I am not using BO enterprise, hence RAS SDK is out of scope. This report will be called thorough stand-alone .NET application in CITRIX environment.
    Can we do it in CR XI/CR 2008?
    Please feel free to comment in case you need more info. But I won't be able to post screenshots. NDA of course!
    Thanks in advance.

    I moved your post to the NET - SAP Crystal Reports forum.
    To start, you have a fair bit of work ahead of you. The Crystal reports SDK will not do the job. You will have to use the InProc RAS SDK which is included in both CR XI and CR 2008. I'd recommend going with CR 2008 as CR XI R1 (11.0) is out of support now and CR XI R2 (11.5) will be out of support come June of 2011. Next, make sure you have applied SP 3 for CR 2008:
    https://smpdl.sap-ag.de/~sapidp/012002523100007123572010E/cr2008_sp3.exe
    As an FYI, all files can be found on the downloads page:
    http://service.sap.com/sap/bc/bsp/spn/bobj_download/main.htm
    Next, you want to read up on RAS. I suggest the following:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10b840c0-623f-2b10-03b5-9d1913866b32
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b050afe0-2fa5-2b10-658d-98f214ba6a4a
    http://help.sap.com/businessobject/product_guides/boexir31/en/rassdk_net_dg_12_en.chm
    Samples are here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples
    and here:
    http://www.sdn.sap.com/irj/boc/samples?rid=/webcontent/uuid/80774579-b086-2b10-db91-ed58c4dda375 [original link is broken]
    I also find this 3rd party link useful:
    http://book.soundonair.ru/sams/
    And as always, search these forums. Lots of info here. E.g.;
    Programaticaly add Table in CR database fields
    InProc RAS Issue
    Adding the columns dynamically in crystal report
    Also, see the search box at the top right of this page. It searches blogs, wikis, Kbases, articles and more - all in one go.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Creating PDF files using file adapter

    Hi,
    Is it possible to create a pdf file using, File/FTP adapter? If yes can someone please suggest how to do it.
    Thanks,
    Phani

    Hi Phani,
    I would say pdf files are binary files with a specialized format.
    You can move pdf files through BPEL or ESB (i.e. file/ftp -> file/ftp), or from file to database BLOB and database to file, by importing the schema as opaque.
    However I doubt that file adapter can create PDF files from a plain-text xml file, i.e. as PDFCreator would.
    In a sense a pdf file is much like a jpg, mp3, or zip file, it can be passed through bpel but not created.
    In other words if you have a base64Binary element in xml, that you know is the complete bytes to a pdf, jpg, or other file, you can write it out as a file using the File adapter.
    Thanks
    Steve

  • Xml publisher enterprise!!! create rtf file dynamically with load xml data

    i am new to xml publisher enterprise , i want a solution for this question ...
    i want create rtf file dynamically with loading xml data....means i wrote a program in jsp where the the output in xml file simultaneously create rtf file..but i enable load the xml data in rtf file but when i goto rtf file from where data in that load xml then it genrate the columns..but i want in dynamiclly to load the data will you please guide me ......

    Hi Atiq
    Im not quite clear on the requirement here:
    1. Do you just want to be able to extract the data and apply a template to the XML data from your jdp and render output?
    If so then you can use the XMLP APIs ... the are in the user guide. Particularly:
    RTFProcessor - converts RTF template to XSLFO stylesheet
    FOProcessor - takes, XML data, XSLFO stylesheet and output format and generates the required output.
    2. Do you want a template that will accept any data and just format it into rows and columns ? This can be written but your XML structure is going to have to be static, the data of course can be dynamic.
    Regards, Tim

  • FAQ: Creating PDF Files from FrameMaker v.6 & earlier Documents -- Why you should not use "save as PDF"! -- Windows & MacOS Only!

    An issue that has come up over and over again on several FrameMaker and Acrobat/PDF email lists as well on the corresponding Adobe User-to-User forums is that of creation of PDF files. FrameMaker 5.5.6 and 6 have what looks like a convenient feature that is supposed to allow you to create PDF files via simply saving the document as a PDF file. I have gone on record as advising end-users not to use this approach for reliable creation of PDF files from FrameMaker documents under Windows and MacOS with FrameMaker 6 and earlier. Why do I most vociferously offer this advice and why doesn't the problem get fixed? And how SHOULD you create PDF files from FrameMaker?
    GOOD NEWS
    I will start with the good news. The "next major version" of FrameMaker will indeed have "save as PDF" re-implemented in a manner that it will be as reliable as printing to the "Acrobat Distiller" printer instance under Windows or the "Create Adobe PDF" desktop printer under MacOS. I am personally working with the FrameMaker development organization to make sure this really happens and is fully and properly tested and debugged! Furthermore, this next major revision of FrameMaker, unlike FrameMaker 6, will come with a Distiller installer that will properly install the "Acrobat Distiller" printer instance under Windows and the "Create Adobe PDF" desktop printer on the Macintosh (of course assuring that the latest PostScript driver is also automatically and correctly installed).
    DON'T USE "SAVE AS PDF"
    But what's wrong with "save as PDF" as currently implemented?
    The following are some of the SYMPTOMS reported over the last few years by FrameMaker users that were traced back to use of "save as PDF" under FrameMaker:
    (1) No PDF file is produced at all, possibly with a log file showing not-readily apparent PostScript errors during distillation.
    (2) The PDF file "loses" color in images. All or some images (raster, bitmap images, NOT vector artwork) appear in the PDF file in grayscale.
    (3) The resultant PDF file is on the wrong paper size, i.e., the document's logical page size does not match the output page size as seen in Acrobat or Acrobat Reader.
    (4) Some or all text in the resultant PDF file is blotchy looking or overly bold.
    (5) Some or all text in the resultant PDF file cannot be searched or indexed.
    (6) Some or all text in the resultant PDF file appears in Courier or in some other substitution font.
    (7) Interword or intercharacter spacing is a bit irregular in the resultant PDF file.
    (8) Content is missing in the margin areas of the page, i.e. you cannot do full-page bleeds.
    (9) Some or all page content is missing (other than margin areas).
    (10) Relatively inefficient PDF is generated.
    If this list by itself isn't enough for you, please note that some of these symptoms are very subtle and may escape attention when the PDF is first viewed or printed. Oftimes, it is when one attempts to manipulate the PDF file in Acrobat or repurpose its content or even view or print on a system other than the one on which the PDF file was created, that some of these symptoms make themselves obnoxiously visible (or invisible in some cases I won't make any bad jokes here about graphic examples!).
    It is important to understand that FrameMaker does NOT have its own native ability to create PDF. Any and all PDF created from FrameMaker documents is actually done by creating PostScript via the PostScript driver and having the Acrobat Distiller create PDF from that PostScript. The only exception to this is creation of PDF via the Acrobat PDFWriter driver, which is likewise not recommended (see below).
    In order for "save as PDF" to work correctly, FrameMaker must do the equivalent of calling Printer Setup and selecting the "Acrobat Distiller" printer instance under Windows or the "Create Adobe PDF" desktop printer under MacOS followed by setting the driver's options correctly for paper size, page range, etc., followed by sending the proper commands to the driver to create PostScript.
    Contrary to popular belief, PostScript as generated by the Windows and MacOS PostScript drivers is VERY device-dependent. The information in the PPD file associated with a printer driver instance provides critical parameters for generation of PostScript including:
    Whether the printer supports color (Acrobat Distiller does)
    What PostScript language level is supported (Acrobat Distiller 4.x and Acrobat Distiller 5.x are both PostScript language level 3)
    Whether native TrueType support is available (Acrobat supports native TrueType as Type 42 fonts)
    Available binary communications (Acrobat Distiller supports pure binary and ASCII, but NOT TCP, TBCP, or PJL)
    Resident fonts (Acrobat Distiller doesn't really have resident fonts)
    Available paper sizes and custom paper size availability (Acrobat Distiller supports a wide range of predefined sizes and continually variable "custom" sizes up to 200" by 200")
    Margins / printable areas (for PDF and the Acrobat Distiller, there are no margins in which imaging is not permitted)
    Device resolution (Acrobat Distiller can be set to any value from 72 to 4000 dpi; as a convenience, the Acrobat Distiller PPD provides a series of values for use by the driver. Since there is no inherent "resolution" of a PDF file, this parameter is used only for purposes of allowing PostScript programs that query for such a value to be satisfied and for the driver to be able to communicate this value to the operating system and/or application as required.)
    Paper handling (totally irrelevant to Acrobat Distiller if input or output tray selection via "setpagedevice" is found in the PostScript stream, it is ignored by Acrobat Distiller)
    Thus, if the wrong printer driver instance is selected (i.e., it isn't associated with the Acrobat Distiller PPD file) or that driver instance is improperly configured, improper PostScript will result and one or more of the symptoms described above can occur. As currently implemented, FrameMaker depending upon version will not necessarily choose the correct printer driver instance and/or correctly parameterize the print job via driver setup options. In fact, FrameMaker 5,5,6 might even try to generate PDF via calling a PCL driver, FAX driver, or even a non-PostScript inkjet printer!
    DON'T USE PDFWRITER
    The Acrobat PDFWriter is a relic of older versions of Acrobat. In fact, it is no longer installed by default in the "easy install" or the "typical install" of Acrobat 5. It hasn't really be updated since Acrobat 3 and only supports PDF 1.2. It is a GDI (Windows) / QuickDraw (MacOS) driver that directly generates PDF without any intermediary PostScript. Since it is not a PostScript printer driver, applications cannot pass through EPS graphics and/or PDFMark information (used for a wide variety of purposes by FrameMaker). For EPS graphics, most applications will send the low resolution TIFF (or PICT) EPS header in lieu of the PostScript text, if they send anything at all, to the driver. Forget about links, structure, or any other PDF "goodies." Expect that PDFWriter will fully "bite the dust" in the next major version of Acrobat.
    SO HOW DO I GENERATE PDF FILES FROM FRAMEMAKER 6 & EARLIER?
    The ONLY method that is really reliable for producing PDF files with FrameMaker 6 and earlier requires the generation of PostScript via a properly set printer driver instance associated with the Acrobat Distiller PPD and distillation of the resultant PostScript by Acrobat Distiller.
    Case 1: FrameMaker and the Full Acrobat 4.05 or Acrobat 5.0x Products
    PDF file from a "chapter" -- print directly to the Acrobat Distiller printer instance (Windows) or the Create Adobe PDF desktop printer (MacOS) already installed by Acrobat. If you check the "Acrobat data" option, then make sure to UNcheck the "print to file" option that gets set at the same time. As a result, the driver will automatically send the generated PostScript to the Distiller for you and delete the intermediate PostScript when done.
    PDF file from a "book" -- print directly to the Acrobat Distiller printer instance with the "print to file" option checked (Windows) or the Virtual Printer desktop printer (MacOS) associated with the Distiller PPD (see details below under Case 2/MacOS). You will need to manually process the resultant PostScript file through the Distiller (or use a "watched folder" arrangement).
    In both the above sub-cases, the default driver options generally will be OK, but check on paper size and communication protocol (Use pure binary, not ASCII, for optimal performance AND no CTRL-D characters under Windows. Make sure to set Level 3 only and Binary under MacOS. Font inclusion "All" for Acrobat 4.05 and "None" for Acrobat 5 under MacOS.). With Acrobat 4.05, make sure you preset the Distiller to use the joboptions you want. With Acrobat 5, you can set this on a job-by-job basis via the driver printer setup interface (or print dialog on MacOS).
    Case 2: FrameMaker 6 and the Bundled Acrobat 4.05 Distiller
    Windows -- Create a new printer driver instance using the latest version of the Adobe Universal PostScript Driver Installer, downloadable from Adobe's web site AND the Acrobat Distiller PPD file (located in the XTRAS subdirectory of the Distiller directory). This driver instance should be set to print to the local port named "FILE:". Name this driver instance as "Acrobat Distiller". The default driver options generally will be OK, but check on paper size and communication protocol (use pure binary, not ASCII, for optimal performance AND no CTRL-D characters). Make sure you preset the Distiller to use the joboptions you want. Print directly to this Acrobat Distiller printer instance. Make sure that the "print to file" option is checked. You will need to manually process the resultant PostScript file through the Distiller (or use a "watched folder" arrangement).
    MacOS -- Install the latest version of AdobePS 8.7.x, downloadable from Adobe's web site. In FrameMaker, go to Page Setup and select the "Virtual Printer" and go to the "Virtual Printer" window pane. Select the Acrobat Distiller PPD file (located in the XTRAS subfolder of the Distiller folder). Print directly to the "Virtual Printer" (Make sure to set Level 3 only, Binary, and font inclusion "All".). Make sure you preset the Distiller to use the joboptions you want. You will need to manually process the resultant PostScript file through the Distiller (or use a "watched folder" arrangement).
    Case 3: Acrobat 3
    Acrobat 3 is not officially supported for the latest OS versions and I personally would no longer recommend its use for generation of PDF files given that Acrobat 5.0.5 is the current version of Acrobat.
    - Dov

    You're asking a lot of ancient Acrobat to work with an Office that never existed when it was made. "Just updated my office suite" is a massive change, and Window 8 didn't exist at that time either...

  • Can Acrobat X Standard create PDF files from Microsoft Word, using "CMYK" color (required by most book printers) instead of "RGB" color?

    I'd like to purchase Acrobat Standard if it will let me control the color space used in the PDF it creates.  I need to send a color file to a commercial book printer, and they require the PDF file to use CMYK colors, not RGB.
    Will Acrobat Standard do this, and if so, how?  Or do I need to get a different Adobe product for this task?

    I'd like to purchase Acrobat Standard if it will let me control the color space used in the PDF it creates.  I need to send a color file to a commercial book printer, and they require the PDF file to use CMYK colors, not RGB.
    Will Acrobat Standard do this, and if so, how?  Or do I need to get a different Adobe product for this task?

  • No ability to create PDF Files using Acrobat 6.01_6.06 after installing Word 2010. (Windows XP)

    Since installing Word 2010 (upgrading from Word 2003) there are no visable PDF Icons nor ability to create PDF Files using Adobe Acrobat 6.06.  Operating system is Windows XP.  Browser is IE8.  Various attempts to bypass this situation have not been successful.  No problems had been experienced earlier using Acrobat 6.01 through 6.06 with Word 2003 and earlier Word versions during the passed 10 years or so.  Adobe's support is not responding to recognize mentioned situations, nor is there any a solution to fix the problem.  Low volume small businesses,with limited need to create PDF files, are being considerably burdened to substante a $200 investment to upgrade to Acrobat X, which may as well not be the solution.  It is appealed for Adobe Forums readers to share similar experiences with possible fixes at hand.  Responses will be greatly appreciated.  Thank you...

    Your response is greatly appreciated, Bernd...
    Unfortunately, those of us who milk software packages for eons such as
    Acrobat 6.06 Standard, a full version of Acrobat X is quoted to be $299
    with no ability to upgrade since 7.0 is the cutoff which remains to be
    only $139.
    It seems to me, Military personal, retired or just ole toots who did
    their think, would offer considerations such as Staples, Lowe's, and
    other big boxes offer.  Such is greed for some who do not consider 
    alternatives above their noses...
    Thank you,
    Skip

  • Does pages create pdf files or should i use adobe

    I need to have software that can read and create pdf files.  Does "pages" do this or should I use adobe?

    Welcome to Apple Support Communities
    Pages can create PDF files. To do it, create a document and, when you have finished it, choose the File menu (on the menu bar) > Export > PDF, so you will be able to read this document with any other PDF software.
    However, Pages can't read PDF files. To read PDF files, Mac OS X comes with Preview, so you don't need to get Adobe Reader to use PDF files on your Mac

  • Creating an Adobe .pdf file without using the Adobe printer

    Is it possible to create a .pdf file by using Acrobat or Microsoft Word or any other program without using a printer driver? So far, when I remove the Adobe printer, I cannot create a .pdf file, as it is looking for the printer and printer driver. Is it even possible to create a .pdf without using, or having, a PDF printer of any sort? Any help on this issue would be most helpful. Thanks.

    I was trying to find a way to create PDFs without using the Adobe printer, or any PDF printer. I posed this question to see if there was a way to create a PDF without the aid of a printer or not. I mean, I know how to reinstall the Adobe printer, since I had to to see if there was another way to go about creating without using the printer. I am just curious if there is a way to create a PDF file without the aid of the Adobe printer or other PDF printers.

  • Embed an external PDF file into the XML

    Dear All,
    We have a program which creates the XML file on the Application server when we execute it.
    My requirement is to Embed an external PDF file into the XML file while generating it through
    program from SAP.
    Please let me know how this is possible.
    Thanks & Regards,
    Vinit

    Yes, you can do it. You have to use an absolute path and add it not only to the folder but to the .manifest
    I wrote a blog post explaining how to do it:
    http://www.captivatecrazy.blogspot.com/#!http://captivatecrazy.blogspot.com/2012/03/embed- pdf-in-captivate-for-lms.html

  • How to Create PDF files from XSL-Fo

    Hi all,
    I have in my KM content many XML files, and I want to export the content to PDF.
    Hi have the XSLT file, but some one could help me how to integrate this with FOP?
    Thank you

    Hi Joao,
                    Verify these links hope it may helps...
    http://www.devx.com/xml/Article/16430/1954
    http://technopaper.blogspot.com/2008/06/using-xsl-fo-to-create-pdf-files.html
    http://www.ibm.com/developerworks/xml/library/x-xslfo/
    http://www.antennahouse.com/XSLsample/XSLsample.htm
    Regards,
    Anil.

  • HOW TO CREATE PDF FILES FROM AUTOCAD 12

    I'M USING ACROBAT X TO CREATE PDF FILES FROM AUTOCAD 12 DRAWINGS.  THE PROGRAM RANDOMLY LEAVES OUT TEXT AND IMAGES.  IT ALSO STRUGGLES WITH TIFF, JPEG AND PDF IMAGE FILES EMBEDDED WITHIN THE AUTOCAD DRAWING.  THIS HAS BEEN AN ONGOING PROBLEM WITH ACROBAT.  I WAS HOPING THE UPGRADE TO  X WOULD ELIMINATE THE PROBLEM BUT IT HAS NOT.

    Hi Joao,
                    Verify these links hope it may helps...
    http://www.devx.com/xml/Article/16430/1954
    http://technopaper.blogspot.com/2008/06/using-xsl-fo-to-create-pdf-files.html
    http://www.ibm.com/developerworks/xml/library/x-xslfo/
    http://www.antennahouse.com/XSLsample/XSLsample.htm
    Regards,
    Anil.

  • Creating PDF file format in OAF

    I have one requirement to create .PDF file using some table content. Is it possible to create using OAF.
    or
    if i am creating the .PDF file using PL/SQL procedure and storing in some BLOB cloumn, is there any possible way to view this file using OAF.
    Thanks in advance.

    OK..Generating PDF file with XML publisher is ok.
    To view, i need to download it with Download control...and then view the PDf file.
    But let say...i have to show employee salary slip in PDF file for every month (Whichever the month user select) in OAF. For this i need to have the PDF file stored in the BLOB column of the database or some where.

Maybe you are looking for