Pdf with java

hi,
is there a library that i can use for
pdf (another than pdflib that i use but it can't
merge pdf with transparency)
thanks
alexkritchek

try itext
http://www.lowagie.com/iText/

Similar Messages

  • Export to PDF with JAVA

    Post Author: gureta
    CA Forum: Exporting
    I
    have a problem with the CRYSTAL REPORT, I am Using It User Java and
    time to show the report in PDF format, is shown as a copciones as HTML
    and export, print etc., without leaving the icon. That class or methods to use video for display the PDF as such? If someone has an example please.  Greetings  Godo

    Post Author: gureta
    CA Forum: Exporting
    I
    have a problem with the CRYSTAL REPORT, I am Using It User Java and
    time to show the report in PDF format, is shown as a copciones as HTML
    and export, print etc., without leaving the icon. That class or methods to use video for display the PDF as such? If someone has an example please.  Greetings  Godo

  • Drag and Drop Image to PDF with Java Script

    Hi,
    I have to create some PDF reports and contained within these reports there are numerous images, some as many as 30-40. This is really time consuming. Can anyone please advise if there is some java script available so I may Drag & Drop an image onto a button or directly onto the PDF report.
    I have attached an example video of the current process and as you will see the process is very long to say the least. Any assistance would be appreciated.
    Kind Regards
    Terry Lewis

    Hi Gilad,
    Apologies for that I edited the wrong video in my Youtube account.
    You mentioned that its not possible with JS.
    Are you aware of any other options?
    Kind regards
    Terry
    P.S. I have amended the video situation.

  • How to embed a signature in the PDF file with Java?

    Hello All!
    There is no problem to sign a PDF with Java for me. But how to embed this signature in the PDF. I really don't know. I've found the PdfSignature class in the iText lib. But it is poor.
    I've read on the another forum: "If you want to do server-based signatures, there is only one option - SecurSign http://www.appligent.com)."

    How to sign a PDF using iText

  • Looking for a convertor from HTML to PDF with J2SE

    Hi all,
    My current project would generate some XML data and display it on the web. Needless to say I have to prepare a matching set of XSL to transform the XML into HTML. I got that part done.
    However, my project also requires a PDF output of the same XML data for download. Well, I planned to do the XSL-fo stuff on it as well. But at some point the client thought since new kind of XML data may be added and it's too troublesome to maintain 2 sets of XSLs, they are requesting a converter to translate HTML directly into PDF now.
    I've searched the web, and found a few converter. But all of them are written in C and can't be embeded directly into my Java code. And my servlet might not have rights to call an external program on the production machine.
    I would appreciate very much if anyone can share their experience on similar issue, using a Java component to convert HTML into PDF. Suggestion of commercial products or open source freeware are all welcome.
    Thank you very much.

    HTML to PDF with Java, using OpenOffice.org - example here: [http://www.dancrintea.ro/html-to-pdf/|http://www.dancrintea.ro/html-to-pdf/]
    You can use OpenOffice.org, running as a server and command it remotely for document convertion.
    Besides HTML to PDF, there are also possible other convertions:
    doc --> pdf, html, txt, rtf
    xls --> pdf, html, csv
    ppt --> pdf, swf
    Code example:
    import officetools.OfficeFile; // this is my tools package
    FileInputStream fis = new FileInputStream(new File("c:/test.html"));
    FileOutputStream fos = new FileOutputStream(new File("c:/test.pdf"));
    // suppose OpenOffice.org runs on localhost, port 8100
    OfficeFile f = new OfficeFile(fis,"localhost","8100", true);
    f.convert(fos,"pdf");
    -----------------------------------------------------------------------------------------------------------------------------------------

  • Problem in printing pdf document with java code

    Hi All
    I want to print a pdf document with java code i have used PDFRenderer.jar to compile my code.
    Code:
    File f = new File("C:/Documents and Settings/123/Desktop/1241422767.pdf");
    FileInputStream fis = new FileInputStream(f);
    FileChannel fc = fis.getChannel();
    ByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
    PDFFile pdfFile = new PDFFile(bb); // Create PDF Print Page
    PDFPrintPage pages = new PDFPrintPage(pdfFile);
    // Create Print Job
    PrinterJob pjob = PrinterJob.getPrinterJob();
    PageFormat pf = PrinterJob.getPrinterJob().defaultPage();
    pjob.setJobName(f.getName());
    Book book = new Book();
    book.append(pages, pf, pdfFile.getNumPages());
    pjob.setPageable(book);
    // System.out.println(pjob.getPrintService());
    // Send print job to default printer
    pjob.print();
    but when i am running my program i am getting error
    Exception in thread "main" java.awt.print.PrinterException: Invalid name of PrintService.
    Please anybody, knows the solution for this error?
    Thanks In Advance
    Indira

    It seems that either there is no default printer setup or you have too many printers or no printer setup at all. Try running the following code. It should print the list of available print services.
    import java.awt.print.*;
    import javax.print.*;
    public class PrintServiceNames{
         public static void main(String args[]) throws Exception {
              PrintService[] printServices = PrinterJob.lookupPrintServices();
              int i;
              for (i = 0; i < printServices.length; i++) {
                   System.out.println("P: " + printServices);
    }From the list pick one of the print service names and set it explicitly like "printerJob.setPrintService(printServices);" and then try running the program.

  • Can I create a PDF with form controls using JAVA?

    I have a web site running on linux (Ubuntu). I'm programming in Java. Presently I use open office to create PDFs with form controls (checkboxes, lists and text fields). I'd like to be able to create in my program (Java) with form controls. JasperReports is not good because I don't see a way to create form controls. Help!!!

    I am not sure what this has to do with the Acrobat SDK, as we don't have a version of SDK for Linux (or Java).

  • Generate pdf with apex listener 2.0

    hi,
    we would like to generate pdf out of apex.
    as long as we have text (IRR) WITHOUT special characters (öäü), everything is working fine.
    when we have this characters in a text-columng (IRR), then we get a .pdf with the following content:
    javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: An invalid XML character (Unicode: 0x3) was found in the element content of the document.
    could this be a problem of the characterset? but if, where to change what?
    - we defined in ADMIN in 'report printing' / 'instance-settings': oracle-apex-listener
    - we are working with apex-listener 2.0 (integrated in weblogic-server)
    - we work with APEX 4.2.1.00.08
    thanks for any ideas
    roland
    Edited by: user514151 on 01.04.2013 23:24

    I have this same problem with windows-1250 encoding.
    Invalid byte 1 of 1-byte UTF-8 sequence.
    com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
         at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:687)
         at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:557)
         at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1753)
         at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar(XMLEntityScanner.java:1426)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2754)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
         at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
         at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
         at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
         at oracle.dbtools.apex.fop.FOPUtils.fop2pdf(FOPUtils.java:72)
         at oracle.dbtools.apex.hooks.postProcess.FOP2PDF.requestTOPDF(FOP2PDF.java:87)
         at oracle.dbtools.apex.hooks.postProcess.FOP2PDF.postProcess(FOP2PDF.java:49)
         at oracle.dbtools.apex.hooks.ProcessorRegistry.postProcess(ProcessorRegistry.java:56)
         at oracle.dbtools.apex.ModApex.handleRequest(ModApex.java:241)
         at oracle.dbtools.apex.ModApex.doGet(ModApex.java:98)
         at oracle.dbtools.apex.ModApex.service(ModApex.java:316)
         at oracle.dbtools.rt.web.HttpEndpointBase.modApex(HttpEndpointBase.java:260)
         at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:110)
    Any solution ?
    Regards
    md

  • How to print PDF under Java control

    Hi, all - thank you for reading this message.
    I'm working with Java 1.4.2_12 and Tomcat but planning to migrate upward Real Soon Now. We are running on Windows Server 2003 (customer's choice).
    My application, using iText, creates a PDF, which comprises a new coversheet plus some existing PDFs appended. The new PDF is needed for archival. This part works OK.
    Now, still in my Java app, I would like to print the new PDF, to a printer chosen in my code. At present I have only PCL and basic PS (2?) capable laser printers, mostly HPs, available and these are all networked - not local - printers.
    I have tried some things using PrintService and this cannot find any PDF printers from the server, though for comparison it did correctly find some PostScript capable devices. Attempts to actually print have resulted in garbage, with the printer obviously mangling the PDF over several trees-worth of paper, if not stopped.
    Has anyone else managed to 'filter' a PDF (under program control) and send it to a regular, networked printer, such as I have described?
    Can anyone confirm that a PS 3 capable printer would handle a PDF direct and if so what DocFlavor would be appropriate?
    Sorry if this is a trivial issue but I have spent quite some time on it and would appreciate any input.
    Thanks - Edwin
    Message was edited by:
    EdwinBolton

    jPDFPrint by Qoppa Software. It's a 100% java library to print PDF documents.

  • XML Publisher report failing with java.lang.outofmemoryerror.

    Hi,
    We have developed a custom Oracle report that produces an XML output file that is about 13M in size (about 18K rows from the database). When running report as concurrent request, post processing fails with java.lang.outofmemoryerror. The failure occurs when specifying output format as Excel, RTF or HTML. However, the process completes successfully when specifying output format as PDF. We have also noticed that Excel, RTF and HTML will complete successfully if the XML data file is smaller (around 3M).
    Is anyone aware of a restriction on the size of the XML data file when specifying output formats Excel, RTF or HTML? We have tried setting temp directory but that has not helped.
    Thanks.

    Hi
    I found this at metalink [Note:390968.1].. hope it helps =)
    Symptoms: When attempting to run an XML Publisher concurrent program the following error occurs:
    ERROR: Warning!!! Got out of memory exception, retrying with scalable option..
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    Oracle.apps.xdo.oa.cp.JCP4XDODataEngine
    Program exited with status 1
    Solution: To implement the solution, please execute the following steps:
    1. Login select the responsibility: System Administrator.
    2. Navigate to Concurrent > Program > Define.
    3. Query for concurrent program that is receiving the error.
    4. In the 'Options' field please enter -Xmx512M.
    5. Save the change and retest the issue.
    6. If the report still fails with the option set to -Xmx512M change the value to -Xmx1024M, save and try again
    7. Migrate the solution as appropriate to other environments.

  • SAVE AS BUTTON WITH JAVA SCRIPT FOR MOUSE UP EVENT

    Please any one help with complete code for "SAVE AS" button to auto save the acrobat form in a user specified path
    with unique name or incremental name.Please post only full script for MOUSE UP event.

    Thanks George but i need an example.my actual need is
    i have created a SAVE INVOICE button.i have set the action"Mouse up" to run a Java script.
    Now i need a scriprt for the same.
    If i press that SAVE INVOICE button.the fie should save on "C:\Users\MUNNA\Desktop" automatically
    with unique name and the name should not remain same for next Save.because it overwrites the previous
    file so please post an example pdf with same.

  • Problem with Java Mapping

    Hello experts,
    I developed a Java Mapping Programm for reading filename of a pdf file and giving filename to a rfc structure for calling a rfc module. Thus, I test it via testing interface method and implementing a main method in my mapping class, which works, but if I run it in the integration server  I get the following exception:
    MP: Exception caused of com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.StringIndexOutOfBoundsException: String index out of range: -7: com.sap.aii.af.rfc.afcommunication.RfcAFWException: java.lang.StringIndexOutOfBoundsException: String index out of range: -7
    That is the execute method of my class:
         public void execute(InputStream inputStream, OutputStream outputStream)
              throws StreamTransformationException {
              // TODO Auto-generated method stub
              try { //The following is for the FileName in the File Adapter
                   DynamicConfiguration dynamicconfiguration =
                        (DynamicConfiguration) map.get("DynamicConfiguration");
                   DynamicConfigurationKey key =
                        DynamicConfigurationKey.create(
                             "http://sap.com/xi/XI/System/File",
                             "FileName");
                   String myFileName = dynamicconfiguration.get(key);
                   MappingTrace trace = null;
                   trace.addInfo(myFileName);
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   TransformerFactory tf = TransformerFactory.newInstance();
                   Transformer transform = tf.newTransformer();
                   Document docout = db.newDocument();
                   Element root = docout.createElement("Z_SD_WEB_HP_INVOICE_STATUS");
                   root.setAttribute(
                        "xmlns:ns1",
                        "urn:sap-com:document:sap:rfc:functions");
                   docout.appendChild(root);
                   Element docName = docout.createElement("IM_DOCNAME");
                   root.appendChild(docName);
                   Text srcxml = docout.createTextNode(myFileName);
                   docName.appendChild(srcxml);
                   DOMSource domS = new DOMSource(docout);
                   transform.transform((domS), new StreamResult(outputStream));
              } catch (Throwable throwable) {
                   throwable.printStackTrace();
    If I test via main method and testing interface mapping  the generated xml is like:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?><Z_SD_WEB_HP_INVOICE_STATUS xmlns:ns1="urn:sap-com:document:sap:rfc:functions"><IM_DOCNAME>232132.pdf</IM_DOCNAME></Z_SD_WEB_HP_INVOICE_STATUS>
    I do not understand why I get this error in real environment.
    Kind regards,
    Erkan

    Hello experts,
    I found the solution. I will also publish this solution, this is also a point which I sometimes missing here in this forum:
    In creating the rfc-xml with java mapping, so a prefix should be add to the name of the rfc-structure e.g.
    ns1:Z_RFC_CALL. If this prefix is missing, then you get this error:
    com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.StringIndexOutOfBoundsException: String index out of range: -7: com.sap.aii.af.rfc.afcommunication.RfcAFWException: java.lang.StringIndexOutOfBoundsException: String index out of range: -7
    To find this I create a grafical test mapping and I check the test rfc-xml with the java created xml.
    Anyway thanks all for the published recommendations.
    Kind regards,
    Erkan

  • How to get the number of pages when assemble pdf with DDX

    Hi,
         I have tried to add two bookmarks to one pdf with DDX(in java code),
         the first bookmark I shall add to the first page,and the second I shall add to the second page....
        the question is:
         If the pdf has only one page, I will not add bookmarks to the pdf. so I need to get the pages of pdf before my processing.
        but I did not found any APIs in the SDK about it .
         Can anyone help me.
         thanks.

    I have solve the problem myself
    I use the tag "DocumentInformation" in DDX and get the xml after invoking DDX,
    the xml contain the information of document
    the sample DDX as:
         <?xml version="1.0" encoding="UTF-8"?>
       <DDX xmlns="http://ns.adobe.com/DDX/1.0/">
               <DocumentInformation source="mergedPDF" result="doc_info.xml" />
       </DDX>

  • How do I get and set column attributes in a table or a treetable with Java?

    Using 11.1.1.4.0
    Hi,
    How do I get and set column attributes in a table or a treetable with Java? For a simple example, say I have a table and want certain roles to see all columns (including address), and other roles can see only certain columns (no address). In a Java method, I want to test if a table's column visible attribute is true and if so, set it to false before rendering it.
    Thanks in advance,
    Troy

    Hi,
    this use case would be a perfect example for using seeded MDS customization. Instead of checking what users are allowed to see or not upon rendering time, you have a customization class and thus the framework doing this for you.
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/31-mds-sample-169173.pdf
    In this paper and sample, specific users see different layouts. It also contains a customization class that shows how this can leverage ADF Security
    Frank

  • Problem in IAS Server with generation of PDF with FOP and XML parsing

    Dear co.forumers :
    We are developing an application that generates a pdf document with FOP Apache utilities, and this PDf is stored in a folder of the server. Firts of all, a DDBB data is retrieved using java ( jdbc) middleware classes ( servlets ), and with these data, the pdf is generated using FOP. In these process, he data retrieved from the DDBB is converted in a XML file , and the with the XSL FOP utility, the pdf is generated.
    In the other hand, we have another application that consults data from a java beans, using a JSP, generates a XML with the data of the beans, and with this XML, and with a XSL file generates and html , with the data and fixed text.
    Both applications have been deployed as a separated WebApp in the IAS. Both use Xalan as XML parser amb Xerces is used aswell.
    So, the problem is , after generating a pdf with the firts application, every html generated via JSP-XML-XSL transformation in the second application is shown completelly bad formated. All fixed text are wrongly composed, and the text that should appear in textFields and ComboBoxes is also bad formated. The XML with the data is well generated, so the problem is in the parsing of these XML and the conversion in html through XSL. We have to re-initiate the server and then everything goes well again. If no pdf is launched, no problem occurs with the other application.
    How an a WEB APP pplication can affect to another, installed both in different folders of the IAS ? We tried to change Xalan version and FOP version, but no result.
    Is this a Poltergeist ?? and X file , maybe ?
    Has anyone had the same problem ?
    Pleae, any help will be very wellcomed.

    A PDF document may be generated in the JDeveloper OC4J server.
    http://www.oracle.com/technology/pub/notes/technote_vohra_fop.html

Maybe you are looking for