4 Replies Latest reply on Dec 10, 2007 4:24 AM by kc@dafolo.dk

    Getting an attached file out of a PDF Document

    Soren Hoy Level 1
      Dose anyone know if it is possible to extract an attached file from a pdf document, with the process designer in workbench. I have the pdf as an in variable. What can I do to extract the attached files from that document?
        • 1. Re: Getting an attached file out of a PDF Document
          Jasmin Charbonneau Level 4
          The LiveCycle Forms service gives you that ability. If you look at the processFormSubmission operation, in the output section, there Attachments parameter that gets you the attachments.

          The Assembler service can also do it, but then you have to build a DDX to extract the attachments.

          Jasmin
          • 2. Re: Getting an attached file out of a PDF Document
            Soren Hoy Level 1
            Hi Jasmin<br />Thanks for the help.<br />Now I have the attached files out of the form and stored on my hard drive, I just have a little problem left that is, that the files do not get the names and file extensions that they originally had.<br />I have set up a variable logger and in the out put from that I can see the original file name. How do I get that name so that I can save the file with it?<br /><br />Paste from variable logger:<br />[PID:617] [ActionID:980] Action Name: "log1" Start...<br />[PID:617] /process_data/AttachmentsVar - List: java.util.ArrayList: Number of elements :2<br />{<br />1:<document state="active" senderVersion="3" persistent="false" senderPersistent="true" passivated="false" senderPassivated="true" deserialized="true" senderHostId="127.0.0.1/172.16.10.125" callbackId="0" senderCallbackId="4386" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="0" contentType="null" length="-1"><cacheId/><localBackendId/><globalBackendId/><senderLocalBackendId/><senderGl obalBackendId/><inline></inline><senderPullServantJndiName>adobe/idp/DocumentPullServant/a dobejb_server1</senderPullServantJndiName><attributes modification-date="Thu Apr 28 13:32:49 CEST 2005" creation-date="Fri May 11 10:59:40 CEST 2007" description="" <br /><br />name="Character Escapes.pdf"/><br /><br /></document><br />2:<document state="active" senderVersion="3" persistent="false" senderPersistent="true" passivated="false" senderPassivated="true" deserialized="true" senderHostId="127.0.0.1/172.16.10.125" callbackId="0" senderCallbackId="0" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="0" contentType="null" length="755664"><cacheId/><localBackendId/><globalBackendId/><senderLocalBackendId/><send erGlobalBackendId><DocumentFileID fileName="C:\Adobe\LiveCycle8\jboss\server\all\svcnative\DocumentStorage\docm119459364011 2\c915519a8c1df59539ab34b62ebf9dd9"/><senderGlobalBackendId/><inline/><senderPullServantJn diName>adobe/idp/DocumentPullServant/adobejb_server1</senderPullServantJndiName><attribute s modification-date="Thu Dec 21 09:14:42 CET 2006" creation-date="Fri May 11 10:59:42 CEST 2007" description="" <br /><br />name="daniel.JPG"/><br /></document><br />}<br /><br />[PID:617] /process_data/@OldFormVar - idp.Document:       Saved to C:\NCRoutXML\\NCRlog.txt_617_980_OldFormVar_1194594010302.pdf<br />[PID:617] /process_data/OutPutXml:       null<br /><br />[PID:617] [ActionID:980] End!
            • 3. Re: Getting an attached file out of a PDF Document
              Jasmin Charbonneau Level 4
              Looks like you have your attachments in "document" variables.

              You can use the following xPath on "document" variables to get the file name associated with it.

              getDocAttribute(/process_data/@inputDocument, "file")

              Jasmin
              • 4. Re: Getting an attached file out of a PDF Document
                kc@dafolo.dk Level 1
                Hi again Jasmin,

                The above does not give the name of the attachment, but I found out (together with Soren) that:

                getDocAttribute(/process_data/@attachmentDoc, "name")

                give the filename of the attachment.

                I was just wondering how you can get just the name of the input file (if it is a PDF document stored in a document input variable).

                Hope you can help out

                Sincerely
                Kim Christensen