Breaking up a PDF into individual PDFs using Java

Hi folks,
It's been a while since I've been here. My dear wife passed away from cancer and I'm not thinking well - so please excuse what might seem like a stupider question than I usually posted in the past.
I will search this out too, but if anyone has any ideas or code off the top of their heads that will allow the parsing of one big .pdf file containing many individual documents - pay stubs in this case - based on ssn, employee id or name or some such, I'd appreciate it. Regards,
~Bill

abillconsl wrote:
It's been a while since I've been here. My dear wife passed away from cancer...My condolences, for what it's worth. Glad to have you back.
so please excuse what might seem like a stupider question than I usually posted in the past.No questions are stupid. The questioner however... : )
(Note: In your absence, Oracle (in their infinite wisdom) seem to have banned the use of "smileys", so we have to resort to alternative strings.)
...if anyone has any ideas or code off the top of their heads that will allow the parsing of one big .pdf file containing many individual documents - pay stubs in this case - based on ssn, employee id or name or some such, I'd appreciate it. Regards,I beiieve Apache POI can handle PDFs. How well, I don't know. I'm also pretty sure that JODConverter can convert all sorts of docs to and from PDF, but for the more esoteric stuff you seem to want, you might need the OpenOffice JDK; however, I believe there's a bit of a learning curve to it, so I hope you're not in a hurry.
Hope you're keeping well.
Winston

Similar Messages

  • Spawn a new PDF using Java Script within LC Designer

    I am trying to spawn a new PDF file to be created from an existing PDF using Java Script within the LC designer
    I have this example but I can't get it to work
    function createPdf()
        pdf = pdf$();
        pdf.addText('Hello World');
        pdf.writeToFile('c:/temp/hello_world.pdf');
        window.open('file://c:/temp/hello_world.pdf');
    Is it possible to create a PDF like this within LC Designer?

    Hi
    I would like to see if it was possible.  I thought it would be easy, as
    there is a standard batch processing sequence (Print 1st page of all) using
    Java that comes with Acrobat 7.  This allows you to print the first page of
    a number of files that you select when the sequence is run.  Its code is:
    /* Print 1st Page */
    /* This sequence prints the first page of
       each document selected to the default printer.
    this.print
    To my uninformed mind it seemed logical that the same code, slightly
    modified to print all pages, should work from within a form.
    Anyway, if there is a way to choose individual files, I would appreciate
    that.
    Thanks
    Rob

  • Idea  about convert word document to pdf using java api

    idea about convert word document to pdf using java api if any one find it mail me at [email protected]

    api if any one find it mail me at
    [email protected]
    What happend to your other mailID :
    [email protected] ????
    http://forum.java.sun.com/thread.jspa?threadID=639851&
    messageID=3756910It received the Spam Of Death. RIP

  • Can we identify the tale in pdf using java.Is there any resources to do

    Hello Everyone,
                                From last two weeks onwards,I'm trying to identify the table from pdf.I tried so many libraries in java. But I didn't get any solution for it. If you people know anyone about identifying the table from pdf using java code.Please send me the solution for this.
    Thanks in advance.

    Hi Sandeep,
    You might want to check the docs: http://stackoverflow.com/questions/26092932/how-to-identitfy-tables-images-and-list-in-pdf -file-using-java
    http://stackoverflow.com/questions/10878695/how-to-read-a-table-in-a-pdf-using-itext-java
    http://stackoverflow.com/questions/2699243/find-tables-in-pdfs
    And the discussion on the thread: https://forums.adobe.com/thread/286110?tstart=0
    Regards,
    Rave

  • Not able to produce some Czech characters in pdf using java.

    Hi All,
    I am not able to produce some Czech characters like ě and č in pdf using java. Can you please guide me what could be the cause. The characters are coded in properties file and its just neglecting č and ě and taking other character next to it.
    we have used below code to display the characters but its also not working..first we thought its font issue since Helvetica dont come by default in windows but after putting helvetica font also we are not able to produce the characters.
    BaseFont baseFont = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1250, false);
                   Font fontStyle = new Font(baseFont, 12, Font.NORMAL, Color.BLACK);

    baftos wrote:
    4th paragraph at http://download.oracle.com/javase/6/docs/api/java/util/Properties.html explains it.
    Note also that Java 6 allows you to produce properties files in encodings other than ISO-8859-1, provided you load them via a reader with a matching encoding. (Also see that link posted by baftos.) This might be more practical then the Unicode encoding which was required in earlier versions of Java.

  • How to create tagged PDF using java iText

    Hi
    I want to create PDF for accessibility purpose using java and iText
    Please help.
    Thanks in advance

    i did this some yrs ago ..scratched and found some code for you. Have a look
    package com.oq.utility;
    import com.lowagie.text.Cell;
    import com.lowagie.text.Document;
    import com.lowagie.text.Element;
    import com.lowagie.text.Font;
    import com.lowagie.text.HeaderFooter;
    import com.lowagie.text.Image;
    import com.lowagie.text.PageSize;
    import com.lowagie.text.Phrase;
    import com.lowagie.text.Rectangle;
    import com.lowagie.text.Table;
    import com.lowagie.text.pdf.BaseFont;
    import com.lowagie.text.pdf.PdfWriter;
    import com.oq.model.Sale;
    import java.io.FileOutputStream;
    import java.util.ArrayList;
    import java.util.List;
    public class iTextExample
        public static void main (String[] args)
            iTextExample eg = new iTextExample();
            Sale sale = new Sale();
            sale.setOdrNumber("1");
            sale.setOdrDate("12-12-12");
            sale.setOdrCatCode("Örder");
            sale.setTotalInvValue("1234");
            sale.setRefNumber("in the line of fire");
            Sale sale1 = new Sale();
            sale1.setOdrNumber("1");
            sale1.setOdrDate("12-12-12");
            sale1.setOdrCatCode("Örder");
            sale1.setTotalInvValue("1234");
            sale1.setRefNumber("fire line");
            Sale sale2 = new Sale();
            sale2.setOdrNumber("1");
            sale2.setOdrDate("12-12-12");
            sale2.setOdrCatCode("Örder");
            sale2.setTotalInvValue("1234");
            sale2.setRefNumber("in the line of firel");
            List<Sale> list = new ArrayList<Sale>();
            list.add(sale);
            list.add(sale1);
            list.add(sale2);
            eg.printPDF(list);
        public void printPDF(List list) {
            Document document = new Document(PageSize.A4, 50, 50, 50, 50);
            try
                // creation of the different writers
                PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("iTextExample.pdf"));
                // various fonts
                BaseFont bf_helv = BaseFont.createFont(BaseFont.HELVETICA, "Cp1252", false);
                BaseFont bf_times = BaseFont.createFont(BaseFont.TIMES_ROMAN, "Cp1252", false);
                BaseFont bf_courier = BaseFont.createFont(BaseFont.COURIER, "Cp1252", false);
                BaseFont bf_symbol = BaseFont.createFont(BaseFont.TIMES_ROMAN, "Cp1252", false);
                // headers and footers must be added before the document is opened
                HeaderFooter footer = new HeaderFooter(
                            new Phrase("This is page: ", new Font(bf_courier)), true);
                footer.setBorder(Rectangle.NO_BORDER);
                footer.setAlignment(Element.ALIGN_CENTER);
                document.setFooter(footer);
                HeaderFooter header = new HeaderFooter(
                            new Phrase("This is a header without a page number", new Font(bf_symbol)), false);
                header.setAlignment(Element.ALIGN_CENTER);
                document.setHeader(header);
                document.open();
                Image img = Image.getInstance("arrow-ff.gif");
                img.setAlignment(Image.RIGHT | Image.TEXTWRAP);
                Table goodTable = new Table(2);     
                      Cell cell1 = new Cell(img);
                goodTable.addCell(cell1);
                document.add(goodTable);
                Cell c = new Cell("Header");
                c.setHeader(true);
                goodTable.addCell(c);
                Cell c1 = new Cell("Header1");
                c1.setHeader(true);
                goodTable.addCell(c1);
                Cell c2 = new Cell("Header2");
                c2.setHeader(true);
                goodTable.addCell(c2);
                goodTable.endHeaders();
                int j=0;
                          while (j< list.size())
                              Sale sale = (Sale)list.get(j);
                              c = new Cell(sale.getOdrDate());
                              goodTable.addCell(c);
                              goodTable.addCell(sale.getRefNumber());
                             j++;
                document.add(goodTable);
                // add text at an absolute position
                document.close();
            } catch (Exception ex) {
                System.err.println(ex.getMessage());
        }

  • Workflow for breaking a concert movie into individual songs

    I have put together a multi-cam, multi-soundtrack sequence in fcp7. Now I need to break it apart and upload individual songs to YouTube. Cutting and pasting should be a natural, but I find the B-Cam footage is distorted, probably because I used wireframe to crop it in the editing process.
    There has to be an efficient way to do this. Can anybody help?
    Much thanks,
    /john

    Well, I'm not REALLY embarrassed, I just look like it. Thanks for a little FCP 101. Appreciate it.

  • Cut vedio file into different frames using java

    Hi friends,
    I would like o know how we can cut the vedio file into different formate using JMF.
    Given an input media file, the object is to cut pieces from the file and generate an output file from that.
    i want to cut vedio from X time to Y time.
    If any one is work on this please help.

    Why "split" the file? Just write a packet with a DataOutputStream(GZipOutputStream()), send it, and then read it back with a DataInputStream(GZipInputStream()) ...
    1. The GZip*Streams take care of compression.
    2. The Data*Streams take of byte order and so on.
    3. Your DatagramPacket handles the transport.
    The hardest part is figuring out what buffer size works best for your network... there is no "right" answer to that.

  • How do I import an InDesign tagged text file into multiple pages and export as .ps or .pdf using Jav

    I have an InDesign tagged text file I've translated from .xml. I need to automate the following steps:
    1 - access specific InDesign template (eg. ABC_template.ind)
    2 - import tagged text file into InDesign
    3 - autoflow text to END of document (normally around 3-5 pages)
    4 - save document as either .ps or .pdf file
    5 - where the input file stub name matches the output stub name (eg., OrigName.txt outputs as OrigName.pdf).
    I would like to completely automate this whole process using JavaScript (because I don't know anyone that knows AppleScript). I've automated the first part using a perl script. I've been trying to find sample snipits of JavaScript that would do one or more of the items listed above, but am having a hard time finding what I need.
    Please, I'm desperate!! Can any of you InDesign scripting guru's out there help me??
    Thanks in advance!!
    LindaD

    Hi Linda,
    I might be able to help you out. You can contact me by email (click on my user name for the address), or if you post your email here.

  • How to break password from PDF using acrobat library?

    I am using "Acrobat.CAcroPDDoc" object and on open method call it is returning false for a password protected file. How can I check the pdf file is password protected by passing the pathname as an argunment? and once identified as a password protected PDF, How can I remove the password using the Acrobat Class?

    If it fails to open, then it’s probably password protected.
    There are no APIs to remove the password, assuming you have it.
    Removing it w/o the actual password would be illegal.

  • Convert .txt file to .pdf using java code

    Hi,
    My requirement is to read the .txt file and convert it into .pdf file after changing certain text.
    Searched the net got a document on iText ..is it the only way for conversion or any other method....please help.
    Thanks in advance.
    Pooja

    Hi.
    You could review this [url|http://www.roseindia.net/java/java-conversion/TextToPDF.shtml].
    It is a good example to use the iText Library.
    The other option could be [PDFBox|http://pdfbox.apache.org/].
    Here some [example code|http://pdfbox.apache.org/userguide/cookbook/creation.html#HelloWorld].
    Another option, but more complicated is [Apache FOP|http://xmlgraphics.apache.org/fop/].
    I hope you can find the right solution.
    Kindest regards, have a great day

  • Problem displaying Arabic characters in PDF using Java APIs

    We are experiencing a problem when attempting to display Arabic characters within a PDF document using the Java APIs.
    The relevant Java code is as follows:
    RTFProcessor processor = new RTFProcessor("example.rtf" );
    processor.setOutput( “example.xsl” );
    processor.setExtractXLIFF(true);
    processor.process();
    ByteArrayOutputStream dataOut = new ByteArrayOutputStream();
    DataProcessor dataProcessor = new DataProcessor();
    dataProcessor.setDataTemplate( example.xdt" );
    if( parameterValues != null && parameterValues.length > 0 )
    setReportParameters( dataProcessor, parameterValues ); // method to set any report parameters from the parameterValues list.
    dataProcessor.setConnection( jdbcConnection );
    dataProcessor.setOutput(dataOut);
    dataProcessor.processData();
    FOProcessor foProcessor = new FOProcessor();
    foProcessor.setLocale( locale );
    foProcessor.setData( new ByteArrayInputStream( dataOut.toByteArray() ) );
    foProcessor.setTemplate( “example.xsl” );
    String xliffFileNameAndPath = getXLIFFFile( “example”, locale );
    if( xliffFileNameAndPath != null )
    foProcessor.setXLIFF( xliffFileNameAndPath );
    foProcessor.setOutput( "example.pdf" );
    foProcessor.setOutputFormat(
    outputFormat == PDF_FORMAT ? FOProcessor.FORMAT_PDF : FOProcessor.FORMAT_HTML );
    foProcessor.generate();
    The method getXLIFFFile( ) gets the relevant XLIFF file for the supplied report locale (if it exists) – the three test files that we used were Italian (example_it_IT.xlf), Spanish (example_es_ES.xlf) and Arabic (example_ar_AE.xlf).
    I imported the following JAR files from the XML Publisher release (version 5.6.2) into my Java application: collections.jar, i18nAPI_v3.jar, versioninfo.jar, xdocore.jar and xmlparserv2.jar.
    The output is OK for all three translations in HTML format, using a charset of UTF-8, and for Italian and Spanish in PDF format. However, the Arabic characters display as question marks in PDF format. The same issue occurs if I stream the output as a byte array straight to the HTTP response rather than save within a file.
    Note that the same RTF, XDT and XLIFF files produce the correct output in both HTML and PDF when executed within XMLPublisher.
    Thank you

    Hi
    I had a similar issue with arabic chars. With PDF layout, chars were appearing properly when preveiwd on local m/c, but as I implement file on server, it was displayed as ?????. I had raised a TAR 5798348.993 with oracle about this and they suggested to apply patch 4028294 Oracle Sourcing J Rollup and then patch 4182914. But later my users changed requirement and i cud not apply the patch to test if it works fine.
    But here, you have suggested that installing fonts would do. Is it really that simple? If yes, dont know what is that patch for which I was told to apply.
    Regards
    Varun

  • Input xml file to crystal report and output  pdf  using java

    Hi all,
    I am in need, I am trying to give the input as dynamic extended Markup Language      and output to be Plain Document Format file, in my crystal report using simple java code. If possible can anyone drop a sample code. that would be great.

    Hi Naveen,
    If i have understood your requirement from your last post. this code should solve your problem.
    What i understand is you want to export a report to PDF format and this report is using XML file data.
    The below code Uses a report designed in Crystal report XI R2.
    Its a Standalone application which uses a Dataset made using the xmldata(xml file) and the xmlschema(xsd file).
    This Dataset is used to populate the report with data.
    Eventually the report is exported to a physical location at the end of this code.
    import com.crystaldecisions.ReportViewer.*;
    import com.crystaldecisions.reports.sdk.*;
    import com.crystaldecisions.sdk.occa.report.reportsource.*;
    import com.crystaldecisions.sdk.occa.report.exportoptions.*;
    import com.crystaldecisions.sdk.occa.report.data.IXMLDataSet;
    import com.crystaldecisions.sdk.occa.report.lib.IByteArray;
    import java.io.*;
    public class XMLData
         public static void main(String[] args)
              final String RPT_NAME = "XMLReport.rpt";
              try
                   ReportClientDocument rpt = new ReportClientDocument();
                   rpt.open(RPT_NAME, 0);
                   FileInputStream fin = new FileInputStream("C:
    Thick_client
    Amol_Sir
    Amol.xsd");
                     ByteArrayOutputStream baos = new ByteArrayOutputStream();
                     byte[] bytes = new byte[1024];
                     for(;;)
                            int count = fin.read(bytes);
                            if(count < 0)
                            break;
                              baos.write(bytes, 0, count);
                    final byte[] xsdBytes = baos.toByteArray();
                    fin.close();
                    //read xml file
                    fin = new FileInputStream("C:
    Thick_client
    Amol_Sir
    Abhi.xml");
                     baos = new ByteArrayOutputStream();
                     bytes = new byte[1024];
                     for(;;)
                            int count = fin.read(bytes);
                                if(count < 0)
                            break;
                                 baos.write(bytes, 0, count);
                   final byte[] xmlBytes = baos.toByteArray();
                   fin.close();
                   IXMLDataSet xml_ds = new IXMLDataSet()
    private IByteArray xmlData = null;
    public void setXMLData(IByteArray xmlData) {
    this.xmlData = xmlData;
    public IByteArray getXMLData() {
    return this.xmlData;
    private IByteArray xmlSchema = null;
    public void setXMLSchema(IByteArray xmlSchema){
    this.xmlSchema = xmlSchema;
    public IByteArray getXMLSchema() {
    return this.xmlSchema;
         xml_ds.setXMLData(new IByteArray() {
         public void fromString(String arrayValue){}
         public String toString() { return ""; }
         public byte[] getBytes() { return xmlBytes; }
         xml_ds.setXMLSchema(new IByteArray() {
         public void fromString(String arrayValue){}
         public String toString() { return ""; }
         public byte[] getBytes() { return xsdBytes; }
    rpt.getDatabaseController().setDataSource(xml_ds, "books/book", "books/book");
    ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream)rpt.getPrintOutputController().export(ReportExportFormat.PDF);
    rpt.close();
    byte byteArray[] = new byte[byteArrayInputStream.available()];
    //Create a new file that will contain the exported result.
                   File file = new File("C:
    Thick_client
    Copy of Amol_Sir
    ExportedReport.pdf");
                   FileOutputStream fileOutputStream = new FileOutputStream(file);
                   ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(byteArrayInputStream.available());
                   int x = byteArrayInputStream.read(byteArray, 0, byteArrayInputStream.available());
                   byteArrayOutputStream.write(byteArray, 0, x);
                   byteArrayOutputStream.writeTo(fileOutputStream);
                   //Close streams.
                   byteArrayInputStream.close();
                   byteArrayOutputStream.close();
                   fileOutputStream.close();
                   System.out.println("Successfully exported report");
              catch (Exception exception)
                   System.out.println(exception.toString());

  • Converting flowing layout xdp to background artwork pdf using java

    I design a Form in LiveCycle designer and save it as XDP. Very nice, since I can see the "fixed content" as content of "draw: elements and my dynamic fields.
    This pdf is going to be served up through the web, and needs no editing. All the form display information either comes from
    a) the boilerplace text)
    b) from a database.
    The boilerplate text data needs to be modified only before the production release of the pdf. after which is really is fixed.
    The second kind of data is really dynamic data.
    Is there a way to programmatically save the XDP as PDF converting all the draw elements into pdf atrwork after we are satisfied with the changes to the boiler plate ?
    I have access to XPAAJ, does that have any way of doing this ?
    Thanks

    Things like that are normally done with the "Interactive Form" UI Element with which you can use the integrated Adobe Forms environment. For more information have a look at the Integrate Online Interactive Forms by Adobe

  • .doc to pdf using java

    Hi
    I need to convert word (doc) format to PDF and PDF to word
    It is not possible to do only using iText.jar
    If some body know please help me.
    can I do this using xsl.I'm not sure since i don't know the format of a word doc

    How about eXportXML (http://www.schultz.dk/exportxml/) and iText.
    Perhaps, you can translate word -> XML -> PDF.
    Good Luck ;-)

Maybe you are looking for