3 Replies Latest reply on Aug 17, 2010 7:18 AM by MaFd0n

    Process to convert multiple supported files to 1 pdf file

    MaFd0n Level 1

      Hi all,



      I am working with a java backend - Flex frontend.

      The user will click a button pubish. This will initialize the java backend and do the following:


      This backend will save multiple files on the LiveCycle's server harddisk (NOT the watched folder). All supported formats for conversion.

      When the files are stored, an XML is generated which contains the path to this location and their filenames.


      This XML-file will be dropped in the input folder of the WatchedFolder.


      The LiveCycle process must read the XML and use it as a reference to get the files stored on the harddisk and convert these to one single PDF.



      The process I've written so far is able to read all the documents specified in the XML file. This is not an issue, the following is:

      What service should I use to actually convert those read documents to a PDF?

      I can live with a pdf per document and then find a merge for those pdf files to one single pdf.


      I need this in a self-written process - in LC Workbench.

      Dropping the files in a watched folder is not an option because I need the converted files delivered in one single PDF file to the customer.


      So what I need but fail to find, due to lack of documentation is a service which accepts one or multiple documents and converts them to a PDF file. Or a service which coverts a document to a pdf and a service to merge multiple pdf files to one pdf file.


      Trying to be more clear & specific about the complete process:

      1) Folder is created on the LC-server harddisk (not in LC Workbench)

      2) Files requried for conversion are uploaded to this location (not in LC Workbench)

      3) XML with filenames & location (= path) is saved in the WatchedFolder/input directory (not in LC Workbench)

      4) Converts each document to a pdf - merges the generated pdfs if necessary - and sends me one single pdf by mail. (in LC Workbench)


      Everything works, apart from actually converting those input files to a PDF.

      Either I'm using the wrong service (GeneratePDF) or I'm doing something else wrong.


      If you require more information I would gladly provide you with such.


      Kind regards!

        • 1. Re: Process to convert multiple supported files to 1 pdf file
          MaFd0n Level 1

          You can put this issue "ON_HOLD".


          It appears our administrator has seperated Services over two different services. One to generate PDFs from other file formats and one to generate PDFs from xml data.


          I am now trying to only use the other service which does have the desired Service-call.


          Until further notice this issue may be ignored as I do have access to the GeneratePDF service together with the CreatePDF2 servicecall.


          Sorry for the inconvenience if any.



          • 2. Re: Process to convert multiple supported files to 1 pdf file
            MaFd0n Level 1

            Ok i successfully generated my PDF files.


            Now I'm having difficulties merging them. I use a DDX file named LiveCycleInput.ddx


            What I do (everything in LiveCycle Workbench):


            1) FileReader to open the .ddx file as a document (successfully)

            2) Store the read document in a process variable (successfully)

            3) Assembler.invokeDDX with following arguments:


            Document DDX = process variable (read in 2)

            OutputResult = "AssemblerResult" processVariable which has type AssemblerResult as specified by the documentation



            Everytime I run the process I get the following stacktrace in my server's logfile:


            ... 119 more
            Caused by: com.adobe.internal.pdfm.CollateralNotFoundException: DDXM_S14017: A <PDF> source document is required, but no documents were found for {PDF source="testFileDoc.doc.pdf" baseDocument="true"}.
            at com.adobe.internal.ddxm.ddx.pdf.PDFSource.getOrderedInputDocs(PDFSource.java:595)
            at com.adobe.internal.ddxm.blueprint.pdf.SourceSegment.addDocumentsForAssembly(SourceSegment .java:91)
            ... 125 more


            The .ddx file is stored in the same path as my generated .pdf files are stored.


            Content of my DDX file (full copy paste)


            <DDX xmlns="http://ns.adobe.com/DDX/1.0/">
            <PDF result="testFileMerged.pdf">
              <PDF source="testFileDoc.doc.pdf"/>
              <PDF source="testFileJpg.jpg.pdf"/>
              <PDF source="testFileOdt.odt.pdf"/>


            Note that the DDX file is read from a network drive(!!) the source PDF files are in the same folder as the ddx file (hence no further path-links).


            Adding network paths to the source & result pdfs does not change a thing.

            All PDF Files apart from the result pdf fiile are present in that same folder


            I consulted the DDX reference multiple times and this is the simplest ddx that should work ... but it doesnt.


            Can anyone help me?

            • 3. Re: Process to convert multiple supported files to 1 pdf file
              MaFd0n Level 1

              Solved. I dont need any more help as I figured it all out by myself in the meanwhile.


              Trial & error ftw!