Generating RTF/PDF/HTML

Hi all
Is it somehow possible to generate an RTF, PDF or HTML easily direct out of Java so that i can display my text and all other stuff like this, without using of a printer/printpreview - i don't want to make it like this
it is easier to simply show the user the final document and he can save/print as he wants it to
perhaps there is a possible convertion of my XML data into an HTML Page with XSL (Xpath and XSLT), but i don't know how to use these sub languages of XML
i will post it in the xml forum too
thank
dietmar gombotz

If you need to convert your output to PDF you can take a look at the iText API at http://www.lowagie.com/iText/.
The same API has a HTMLWriter and PDFWriter that can convert XML into HTML/PDF. You might need to do a bit more research to see if this would suit you.
Thanks
Saravanan

Similar Messages

  • I generate file (PDF, HTML, etc) the report is empty but I run in paper

    Hi
    I use oracle Report10g
    When I generate file (PDF, HTML, etc) the report is empty but I run in paper design show data, the report in the paper design show many pages, when generate file show only the information of the margin in the main seccion and the body is empty,
    Thanks

    Thanks Daniel for pointing that out.  Though you answer is helpful but I am not sure if that is what I would want to do.
    The link you provide for csv says "For each report there's an _report.xdo file that contains the XML structure of the report... "   It suggests I modify the .xdo file for each report.  I currently have 16 reports.
    Does it mean I modify the .xdo file for all 16  and what happens if someone creates a 17th report ?
    Also, what if I run the same report using different input parameters will that change the xml structure for the report  and therefore will need me to modify the .xdo again ? (I think it should not change the xml structure so the answer should be "NO" to that, unless I change the structure of the report).
    Finally, the link you provide says after doing what it suggest  "Now log back into BI publisher and select the report. You should now be able to see that CSV is now an option."
    CSV should be an option where ? on what screen/page ?  Maybe PDF is already an option for me that I cant see because I do not know where that option is.
    I was hoping there would be something I could do on the xdo_metadata sheet (in the data constraints section or elsewhere) OR in BI Publisher itself as some property of the report.
    I will try out what you suggest any ways.
    M. Jamal

  • Generating as PDF, HTML

    I am running a report from a form to PREVIEWER (the reports is accepting a set of
    parameters). When I try to go to File - > Generate --> PDF or HTML the report generates the files but does not use the parameters, making the reports useless.
    TIA.

    You don't say which version of Reports you are using, but if it's a production version (ie not Reports 6i beta) then you should upgrade to the latest patch set available from Oracle Support Services for your release - this has been fixed.
    Regards
    The Oracle Reports Team http://technet.oracle.com

  • Cannot open the pdf when using the xml publisher to generate rtf report

    Hello Everyone,
    I followed the below link to generate a pdf using xml publisher in OAF.
    http://apps2fusion.com/at/ps/260-integrating-xml-publisher-and-oa-framework
    When i try to save the pdf and open it, i get the below error:
    Adobe Reader could not open the pdf because it is either not a supported file type or because the file has been damaged(for example, it was sent as an email attachment and wasn't correctly decoded).
    Below is the code in CO.
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am= (OAApplicationModule)pageContext.getApplicationModule(webBean);
    String event = pageContext.getParameter("event");
    if("GenerateReport".equals(event))
    // Get the HttpServletResponse object from the PageContext. The report output is written to HttpServletResponse.
    DataObject sessionDictionary = (DataObject)pageContext.getNamedDataObject("_SessionParameters");
    HttpServletResponse response = (HttpServletResponse)sessionDictionary.selectValue(null,"HttpServletResponse");
    try {
    ServletOutputStream os = response.getOutputStream();
    // Set the Output Report File Name and Content Type
    String contentDisposition = "attachment;filename=EmpReport.pdf";
    response.setHeader("Content-Disposition",contentDisposition);
    response.setContentType("application/pdf");
    // Get the Data XML File as the XMLNode
    XMLNode xmlNode = (XMLNode) am.invokeMethod("getEmpDataXML");
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    xmlNode.print(outputStream);
    // System.out.println(outputStream.toString());//Testing the output by printing the contents in the outputstream.
    ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
    ByteArrayOutputStream pdfFile = new ByteArrayOutputStream();
    // System.out.println("language is "+pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getLanguage());
    // System.out.println("country is "+pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().geCountry());
    //Generate the PDF Report.
    TemplateHelper.processTemplate(
    ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getAppsContext(),
    // APP_NAME,
    "PER",
    // TEMPLATE_CODE,
    "Emp_Template",
    // ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getLanguage(),
    "English",
    // ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getCountry(),
    "United States",
    inputStream,
    TemplateHelper.OUTPUT_TYPE_PDF,
    null,
    pdfFile);
    // Write the PDF Report to the HttpServletResponse object and flush.
    byte[] b = pdfFile.toByteArray();
    response.setContentLength(b.length);
    os.write(b, 0, b.length);
    os.flush();
    os.close();
    pdfFile.flush();
    pdfFile.close();
    catch(Exception e)
    response.setContentType("application/pdf");
    throw new OAException(e.getMessage(), OAException.ERROR);
    pageContext.setDocumentRendered(false);
    Any suggestions on this would be great!
    Thanks
    Kumar

    Below is the code. Can you change so that that the output can be seen in HTML? I checked the language, country etc and they are fine.
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am= (OAApplicationModule)pageContext.getApplicationModule(webBean);
    String event = pageContext.getParameter("event");
    if("GenerateReport".equals(event))
    // Get the HttpServletResponse object from the PageContext. The report output is written to HttpServletResponse.
    DataObject sessionDictionary = (DataObject)pageContext.getNamedDataObject("_SessionParameters");
    HttpServletResponse response = (HttpServletResponse)sessionDictionary.selectValue(null,"HttpServletResponse");
    try {
    ServletOutputStream os = response.getOutputStream();
    // Set the Output Report File Name and Content Type
    String contentDisposition = "attachment;filename=PrintPage.pdf";
    response.setHeader("Content-Disposition",contentDisposition);
    response.setContentType("application/pdf");
    // Get the Data XML File as the XMLNode
    XMLNode xmlNode = (XMLNode) am.invokeMethod("getEmpDataXML");
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    // xmlNode.print(outputStream);
    // System.out.println(outputStream.toString());//Testing the output by printing the contents in the outputstream.
    ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
    ByteArrayOutputStream pdfFile = new ByteArrayOutputStream();
    // System.out.println("language is "+pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getLanguage());
    // System.out.println("country is "+pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().geCountry());
    //Generate the PDF Report.
    TemplateHelper.processTemplate(
    ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getAppsContext(),
    // APP_NAME,
    "PER",
    // TEMPLATE_CODE,
    "Emp_Template",
    // ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getLanguage(),
    "en",
    // ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getCountry(),
    "US",
    inputStream,
    TemplateHelper.OUTPUT_TYPE_PDF,
    null,
    pdfFile);
    // Write the PDF Report to the HttpServletResponse object and flush.
    byte[] b = pdfFile.toByteArray();
    response.setContentLength(b.length);
    os.write(b, 0, b.length);
    os.flush();
    os.close();
    pdfFile.flush();
    pdfFile.close();
    catch(Exception e)
    response.setContentType("text/html");
    throw new OAException(e.getMessage(), OAException.ERROR);
    pageContext.setDocumentRendered(true);
    Thanks

  • Report Generate to File PDF, HTML,Excel and Others Format

    Dear Experts,
    I am using Oracle 9i and Developer 6i. How I convert report in PDF, HTML, Excel and others format after generating the report. When i try to generate, then giving the following error message:
    REP-0999: Unimplemented Error.
    How can I solve it, Please help me.

    Do the column headings display ok but the data does not?
    If so it may be related to the font size. i.e. the whole report may not fit on the page when scaled for pdf output.

  • Generating rotated boilerplate text in PDF, HTML format

    Hi,
    I am trying to create rotated boilerplate text in Report 6i to PDF, HTML formats.
    Rotated text generates fine using Report 6i's own report generation (Previewer) but when it's generated to PDF or HTML format output the rotated text are mirrored (in PDF) or simply does not display (in HTML).
    thank you,
    Allan

    I tried to rotate boilerplate texts (45 degree clock wise and anti-clock wise), all works fine in PDF. HTML doesn't support rotated text natually, you can workaround this by create an image for the rotated text.

  • Generate a PDF file

    Hi all
    I am trying to generate a PDF file from the browser contents(html).
    if i give the mime type as owa_util.mime_header(ccontent_type => 'application/vnd.ms-excel'); i am able to genetate a excel file
    but on the other hand if i use owa_util.mime_header(ccontent_type => 'application/pdf');
    i thoucht that i will et pdf output but
    nothing happens
    i am using pl/sql language to generate this code (i mean it is a pl/sql portlets).
    can any one help me on this plz.
    thanks
    Balaganesh

    hi, Jaber,
    The basic coding is listed as following:
    package mypackage1;
    import com.lowagie.text.Image;
    import com.lowagie.text.Element;
    import com.lowagie.text.Document;
    import com.lowagie.text.DocumentException;
    import com.lowagie.text.PageSize;
    import com.lowagie.text.Paragraph;
    import com.lowagie.text.Rectangle;
    import com.lowagie.text.html.HtmlWriter;
    import com.lowagie.text.pdf.PdfWriter;
    import com.lowagie.text.rtf.RtfWriter2;
    import com.lowagie.text.Image;
    import com.lowagie.text.pdf.PdfPCell;
    import com.lowagie.text.pdf.PdfPTable;
    import java.awt.Color;
    import com.lowagie.text.pdf.BaseFont;
    import com.lowagie.text.Font;
    import com.lowagie.text.Chunk;
    import com.lowagie.text.pdf.BarcodeEAN;
    import com.lowagie.text.pdf.PdfContentByte;
    public class Servlet1 extends HttpServlet
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException {
    // step 1
    // Create new document with A4 pagesize and standard margins: Left(3.18cm), Right(3.18cm), Top(2.54cm), Bottom(2.54cm).
    Document document = new Document(PageSize.A4, 93, 93, 72, 72);
    try {
    // step 2
    // Set the ContentType and create an instance of the corresponding Writer
    response.setContentType("application/pdf");
    PdfWriter writer = PdfWriter.getInstance(document, response.getOutputStream());
    //Define Chinese fonts.
    BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
    Font font_section = new Font(bfChinese, 12, Font.NORMAL|Font.BOLD);
    // step 3
    // Open the document
    document.open();     
    // step 4
    // Add the text.
    Paragraph application_name = new Paragraph("System Account Application Form", font_application);
    application_name.setAlignment(Element.ALIGN_CENTER);
    application_name.setSpacingAfter(10);
    document.add(application_name);
    catch(DocumentException de) {
    de.printStackTrace();
    System.err.println("document: " + de.getMessage());
    // step 5: we close the document (the outputstream is also closed internally)
    document.close();
    thanks
    George
    My HK travel blog: http://hktour.blogspot.com
    (Update daily)

  • XML Publisher Report not generating the PDF output.

    Hi,
    I am trying to develop a XML Publisher Report in R12 Vision Instance.
    I have developed the rdf report and concurrent program with XML as output format. Ran the concurrent program and I got the XML output. Based on XML output I have created the rtf template. Using both the template and xml output I have created in Data Definition and Template in XML Publisher Administrator Responsibility. Now I am comming to the concurrent program and running the program, here instead of generating the PDF output it is generating again the XML output and concurrent program completing with warning status.
    When I am trying to do the same in 11i Vision Instance, Concurrent Program completing with normal status and when trying to view the output it is saying "Unable to Publish output for the Processed Request".
    Kindly please help me out in this issue.
    Thanks,
    Manasa.

    Hi Mahesh,
    Here the concurrent programs are not erroring out. It is completing with Warning status and when we click on View Output the output is coming in XML format instead of PDF, this is in R12 Vision Instance.
    In 11i Vision Instance, concurrent program is completing with Normal Status but when we click on View Output it is saying "Unable to Publish output for specified request".
    Thanks,
    Manasa.

  • R12 : System Failed to generate the PDF Document.

    I am trying to create a PO thru auto create but I hit inquire > View Document , I encountered an error: System Failed to generate the PDF Document. Please contact your system administrator. We just updgrade our instance from 11.5.2.10 to r12.1.2. Any thoughts?
    Thanks,
    Leo

    Please see if these docs help.
    System Fails To Generate PDF Document After Clicking "PDF Document" On Supplier Notification When Different Languages Are Used [ID 1078546.1]
    PO Email From Tools>Communicate At Same Time of Approval Corrupts PDF File Transmits As .HTML & System Failed to Generate PDF [ID 1287488.1]
    Thanks,
    Hussein

  • How to generate a PDF report using ADF RichTable?

    Hi,
    I am using JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. I am displaying my data from db in a JSF Fragment(JSFF) using ADF RichTable component. Actually now I want to generate a PDF report using that data shown in the table on click of a Generate Button. Can anyone please provide me code or sample for that?
    Thanks,
    Vikas

    http://kohlivikram.blogspot.com/2009/04/generate-pdf-report-in-adf.html
    Thanks,
    Navaneeth

  • Generating a PDF file from a formPrintView:PrtViewCreateScr = new PrtViewCreateScr();

    I am using formPrintView:PrtViewCreateScr = new PrtViewCreateScr(); to create and loada form to print the contents of a database record.
    I would like to be able generate and save a pdf file containing the same data formatted in the same way.
    Is there any functionality available in FLEX 3 to accomplish this?
    Is there an external open source offering available? (I have seen AlivePDF, but there doesn't appear to be any current traffic on the web site I know of - lucamezzalira.com/2009/02/28/...)
    Is this covered in Flash 4 and would an upgrade to this release be the better route? (given that the pdf create/save is an important feature of my application)
    Any ideas/suggestions woudl be greatly appreciated.
    Scott

    Even on the same machine ...
    I am not working with mySQL, try Google it, but what I am saying is that if you are anticipating requests for reports printing and practically every business application would have reporting mechanism, you should look into integrating into your Flex front-end program some server side reports generation. There are free SQL Server versions available, you can try these. But I would carefully select a report engine because depending on user requirements you will get down the road some report programs might not be what you want. What you could do with a free copy is to come up with a vehicle to deliver a report to your Flex interface. You need to decide what format to use. For example: PDF, HTML, Image, something else.

  • My client asks ... can we generate a PDF not via Word...?

    Using: RH HTML 7.0.3.
    Hi all,
    A client has invested time into developing a good CSS style sheet and RoboHelp template for creating a nice looking CHM HTML Help. My client wants to find a way of creating a nice looking PDF document without investing more time in developing a good Word template for export to PDF.
    The client asked me what seems to me to be a dumb question about PDF generation. Is there such a thing as generating a PDF not via Word? - (Whatever that means.) My client seems to think there is a way. But since my client asked, I have to ask you all...
    I tried out the quick way of simply clicking on the PDF icon, and seeing what happens. So RH generated for me a PDF, without asking me for any more info. The Output logger showed clearly that RH was first creating a *Word file*. And sure enough when I looked in its target folder I saw there was also a *Word doc* there, completed a minute earlier. A definite sign, I think, that RH first created the Word doc and then from it created the PDF. (Btw, I don't know where RH got the TOC from for this PDF generation - it seems like a ghost of the TOC I used months ago.) 
    Then I tried using the Generate wizard from the Single Source Layouts pod. One of the stages of this wizard prompts you to select a template, including any *Word templates* you have fed RH in the past. Again a good sign, IMO, that the initial process for making a PDF is the same as for making a Word doc.
    Over to you all.
    TIA
    avraham

    RH has to create a Word document but if you deselect the Word check box, it is not saved. What you saw was probably an old document. Delete it and publish just a PDF and you should not be able to see the temporary Word document that is created.
    In the wizard you don't have to select a Word template, that is just one of the options.
    The content of the print layout is not related to your TOC. It takes the content of a TOC when you first create the print layout but then the two are standalone. You might not want the print layout to be the same as the TOC. If you do, use the arrows to clear the content and then replace it with the current TOC.
    This is covered in Printed Documents on my site.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • "Save as pdf" generates corrupt pdfs

    Hello everybody,
    I have a problem with the "save as pdf" option in the printing menu. When generating the pdf for a document which contains bitmapped embedded images, the actual images in the pdf file are corrupt when opened on a windows/linux machine with the latest version of acrobat reader.
    If I open the document on a mac, either with preview or with acrobat, it looks fine. The problem seems to be the compatibility of the generated pdf with the windows/linux version of acrobat reader.
    Moreover, the problem happens randomly when printing either from Pages or Keynote, so I think it is not an application-dependent issue. I tried also to save as pdf-X but this does not solve the problem.
    Some idea on how to fix this compatibility issue on the Tiger's internal pdf generator?
    Thank you very much,
    Vittorio

    Stuck files in the queue sounds like a problem I had with Acrobat X. The
    10.0.1 patch broke the Adobe PDF printer, so that it tried to use the
    COM1: port, instead of the Documents or Desktop port. (You can check for
    this by right-clicking the Adobe PDF printer, choosing "Printer
    Properties," then selecting the "Ports" tab.) In fact, it deleted those
    ports! (Here's a link to that problem:
    http://kb2.adobe.com/cps/893/cpsid_89330.html). The result was PDFs that
    would not print, and would be left stuck in the printer queue. The fix
    was to delete the Adobe PDF printer, then run the Acrobat repair option
    to regenerate it. You might want to do this. Following are the
    directions for Windows 7. Windows XP instruction are included at the
    link above.
              *Windows Vista (UAC on, nonadmin user), Windows 7 (UAC on,
              admin user)*
    1. Close all PDF files.
    2. Go to Printers and Faxes (Windows XP), Printers (Vista) or Devices
        and Printers (Windows 7).
    3. Right-click the Adobe PDF printer and click Delete (Windows XP,
        Vista) or Remove Device (Windows 7).
    4. Enter the admin credentials. This step deletes the Adobe PDF printer.
    5. Go to Programs and Features (Vista and Windows 7).
    6. Select Adobe Acrobat X Pro or Standard and click Change.
    7. Select Repair and follow instructions to complete repair.**
    By the way, I don't think this was mentioned earlier, but another cause
    of problems with PDF generation is having more than one installation
    and/or version of Acrobat, Adobe Reader, or the PDF creation add-on that
    comes with FrameMaker installed simultaneously. If you have Acrobat, you
    should NOT have Adobe Reader or the PDF creation add-on installed on the
    same computer, and you should have only one version of Acrobat installed.

  • RH11 - Cuts off tables when I generate review PDFs. How do I get it to include the entire table?

    We just upgraded from RH9 to Rh11. I'm using the Create PDF for Review... option on the Review menu. I have several two column tables in the topic I'm sending for review. The PDF cuts off half of the second column in the tables. We didn't have this issue with RH9. Has anyone else had this problem with the PDF review feature in RH11? Can you tell me why it's doing this & how to fix it?
    Thanks

    Hi Peter and everyone else.
    I started using RH 11 recently, and I am experiencing the same issue as CathyR-Fico reported: when generating the PDF output, RH keeps cropping some of my tables.
    NOTE: some of my table cells contain long non-breakable text strings such as TimeoutInsightServerUpDisconnectedCheck. Can't avoid that.
    I looked into the table properties and ensured that my table width is 100%, and adjusted the individual column width % to make sure that the total does not exceed 100%, but my tables are still cropped in PDF.
    Here is a passage from the RH 11 User Guide, Create a PDF for review section: "Tables, images, and other elements that do not fit in a page are cropped." I keep checking my HTML preview now and then - all of my tables fit into the HTML help window. But the PDF output looks otherwise:( I tried the AutoFit feature as well - won't help:(
    My question is: Is there any other way to ensure that my tables fit into any output page, be it PDF, Word or HTML?
    Thanks!

  • Generated RTF TOC displaying 0 for page numbers

    Hi,
    I have an issue where I created a table of contents using Styles in Microsoft Word in my .rtf template. This is how it is displayed in the template and how I wish to display it in the generated .rtf:
    Section 2.3 : Section 2.3 Test...................48
    Section 2.3.1: Section 2.3.1 Test.............48
    Section 2.3.2: Section 2.3.2 Test.............48
    Section 2.3.3: Section 2.3.3 Test.............49
    Section 2.3.4: Section 2.3.4 Test.............50
    Section 2.3.5: Section 2.3.5 Test.............50
    When I go to generate the .rtf, the page numbers all turn to '0'. The hyperlink works correctly but the page numbers are not displaying the correct numbers. If I generate in a .pdf format, the numbers appear correctly. Unfortunately I need this to be in .rtf format. Anyone have any ideas? I cannot find anything on this issue.
    Generated in .rtf:
    Section 2.3 : Section 2.3 Test...................0
    Section 2.3.1: Section 2.3.1 Test.............0
    Section 2.3.2: Section 2.3.2 Test.............0
    Section 2.3.3: Section 2.3.3 Test.............0
    Section 2.3.4: Section 2.3.4 Test.............0
    Section 2.3.5: Section 2.3.5 Test.............0
    Thanks.

    Its identified as a word issue.
    You need to manually update the TOC in generated RTF to refresh page numbers.
    Check the note 'Table Of Contents Page Numbering In RTF Output Is Incorrect (Doc ID 473505.1)'

Maybe you are looking for

  • Problem with Dataservice Control 9.2

    Hi, I am going thru the documentation to setup this control in Workshop 9.2. I get the following error in step 7-26 "Error occured while retrieving Metadata. Either the deployed DS is invalid or the wls90interop.jar is not the 8.x DSP server's classp

  • ITunes Extras not playing

    I have read multiple threads on this issue (over a year old, and for the Windows version of iTunes), but haven't seen any fixes yet (for Mac or Windows). I have a dozen or so movies that I purchased from the iTunes store (or downloaded as Digital cop

  • Process monitor setup

    I wonder if someone could advise me in setting up process monitor. I have a jist of how to do it but feel by the amount of data I'm getting that I missed something. My goal is just to monitor writes to the hdd as I'm trying to pin down what is thrash

  • IDOc posting  error

    hai friends iam getting idocs form xi system (matmas) in this MBEWM segement  is repeting meny times in this segment BWTAR field some times not having any value at that time if the that segement is is first segment then it is posting proparly but if

  • Conference call not working in IPCCX callcenter environment

    hi, when i make a conference call using "conf" soft key. the initiator hears the busy tone when adding third party..  i am facing the same problem when all extensions are internal numbers...the cucm version is 6.1(4) and ipccx 7.0 Regards Nareh