Sign In  Sign Up Live-Chat

Unable to parse form XML from PDF file

Last post 03-10-2008, 9:56 AM by forever. 13 replies.
Sort Posts: Previous Next
  •  01-17-2008, 2:52 PM 109477

    Unable to parse form XML from PDF file

    Attachment: Present (inaccessible)

    We are attempting to pull the XML(or even just the FORM XML) from the following file but we get an error on the sceen.

    Could not execute the test pdf parser activity due to one or more errors:
    AsposeWrapper.Asposepdf.reflectedInvokeMethod: AsposeWrapper.Asposewords.acceptAllRevisions() Exception occurred System.IO.IOException: Read pdf error:Trailer is not found. at xeb116a323308e2f7.x7759a935a2782a02.readPdf() at xeb116a323308e2f7.x7759a935a2782a02..ctor(String filename, SByte[] ownerPassword) at Aspose.Pdf.Kit.Form.xedff4d4fd296f454() at Aspose.Pdf.Kit.Form..ctor(String srcFileName) at AsposeWrapper.Asposepdf.extractXML(EntityType context, String sourceFilePathNew)


    Dan Gillespie
    VP, Business Development
    Click Commerce
     
  •  01-17-2008, 8:12 PM 109496 in reply to 109477

    Re: Unable to parse form XML from PDF file

    Hi,

    Thank you for considering Aspose.

    Can you please provide your code and let us check it?

    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  01-18-2008, 10:00 AM 109575 in reply to 109477

    Re: Unable to parse form XML from PDF file

    Aspose.Pdf.Pdf asposePDF = new Aspose.Pdf.Pdf();

    String sourceFilePath="c:\\installers\\test.pdf";

    Aspose.Pdf.Kit.Form frm= new Aspose.Pdf.Kit.Form(sourceFilePath);

    //Manipulate the paths and files
    String sourceFileName = Path.GetFileName(sourceFilePath);
    ....

    String tempFilePath = Path.Combine(tempDirectory, outputFileName);

    //Create a new xml file to contain the content of the pdf.
    System.IO.FileStream xmlOutputStream = new FileStream(tempFilePath, FileMode.Create);
    //Export all the pdf fields' value into the xml file.
    frm.ExportXfdf(xmlOutputStream);
    xmlOutputStream.Close();

     


    Dan Gillespie
    VP, Business Development
    Click Commerce
     
  •  01-18-2008, 1:18 PM 109596 in reply to 109575

    Re: Unable to parse form XML from PDF file

    Hi,

    I have tested with Aspose.Pdf.Kit v 2.6.4.4 and was not able to reproduce the error.

    Thanks.

     
  •  01-18-2008, 3:32 PM 109605 in reply to 109477

    Re: Unable to parse form XML from PDF file

    Attachment: Present (inaccessible)

    Following the upgrade of both PDF and PDF Kit the file is returning XML:

      <?xml version="1.0" encoding="utf-8" ?>
    - <xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
      <fields />
      </xfdf>
     
     
    However, Adobe Acrobat Exports a different file when you export it.  Try
    Menu item Document:Forms:Export Data looks like the following
     
    How can I extract this XML?
     
     <?xml version="1.0" encoding="UTF-8" ?>
    - <xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
    - <grantwrapper:GrantApplicationWrapper xmlns:glob="http://apply.grants.gov/system/Global-V1.0" xmlns:grant="http://apply.grants.gov/system/MetaGrantApplication" xmlns:grantwrapper="http://apply.grants.gov/system/MetaGrantApplicationWrapper" xmlns:header="http://apply.grants.gov/system/Header-V1.0">
    - <grant:GrantApplication xmlns:globLib="http://apply.grants.gov/system/GlobalLibrary-V1.0">
    - <header:GrantSubmissionHeader glob:schemaVersion="1.0">
      <glob:HashValue glob:hashAlgorithm="SHA-1">UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi</glob:HashValue>
      <header:AgencyName>NAVAL FACILITIES ENGINEERING COMMAND</header:AgencyName>
      <header:CFDANumber>12.300</header:CFDANumber>
      <header:ActivityTitle>Basic and Applied Scientific Research</header:ActivityTitle>
      <header:OpportunityID>N62473-08-R-RELEASE</header:OpportunityID>
      <header:OpportunityTitle>Release of Captive Bred San Clemente Loggerhead Shrike on San Clemente Island, California</header:OpportunityTitle>
      <header:OpeningDate>2008-01-07</header:OpeningDate>
      <header:ClosingDate>2008-01-17</header:ClosingDate>
      <header:SubmissionTitle>dsdsd</header:SubmissionTitle>
      </header:GrantSubmissionHeader>
    - <grant:Forms>
    - <RR_PerformanceSite:RR_PerformanceSite xmlns:RR_PerformanceSite="http://apply.grants.gov/forms/RR_PerformanceSite-V1.1" RR_PerformanceSite:FormVersion="1.1">
    - <RR_PerformanceSite:PrimarySite>
     
     
     

    Dan Gillespie
    VP, Business Development
    Click Commerce
     
  •  01-19-2008, 2:38 AM 109637 in reply to 109605

    Re: Unable to parse form XML from PDF file

    Dear djgilles

    Thanks for considering our products!

    Please try Form.ExportXml( ) instead of Form.ExportXfdf( ). I would like to remind you that XFDF and XML are two different kinds of data formats.

    Best regards.


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  01-22-2008, 11:05 AM 109961 in reply to 109477

    Re: Unable to parse form XML from PDF file

    Changing the call to exportXML gave me the correct XML as you suggested.  Thanks!

    However, there is another issue.  The XML when extracted from Adobe PDF viewer is complete.  The Aspose exported version gives the following error.

    - <RR_SF424:EstimatedProjectFunding>
      <RR_SF424:TotalEstimatedAmount />
      <RR_SF424:TotalfedNonfedrequested />
      <

    The XML page cannot be displayed

    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


    End tag 'SFLLL:FederalProgramName' does not match the start tag 'SFLLL:LobbyingActivitiesDisclosure'. Error processing reso...

    </SFLLL:FederalProgramName>
    --^
    Can you take a look into this issue?  thanks!
     
     

    Dan Gillespie
    VP, Business Development
    Click Commerce
 
  •  01-22-2008, 1:27 PM 109986 in reply to 109961

    Re: Unable to parse form XML from PDF file

    Hi,

    I have checked the pdf and was able to reproduce this error. I have logged this as PDFKITNET-4330 in our issue tracking system. We eill try our best to resolve this issue as soon as possible.

    Thanks.

     
  •  01-23-2008, 10:32 AM 110116 in reply to 109986

    Re: Unable to parse form XML from PDF file

    Would you like some additional PDFs to take a look at?  Let me know if I can provide more files to help you.
    Dan Gillespie
    VP, Business Development
    Click Commerce
     
  •  01-23-2008, 11:12 AM 110124 in reply to 110116

    Re: Unable to parse form XML from PDF file

    Hi,

    If you have any more files which are giving same issues then please post them here.

    Thanks.

     
  •  02-01-2008, 4:20 PM 111581 in reply to 110124

    Re: Unable to parse form XML from PDF file

    I've attached some additoinal files.  Is there any update on this issue?
    Dan Gillespie
    VP, Business Development
    Click Commerce
     
  •  02-03-2008, 3:42 AM 111645 in reply to 111581

    Re: Unable to parse form XML from PDF file

    Dear dijilles,

    The samples you provided are much different with ours. We need some times to solve this problem, and the ETA is one week. Thanks for your patience.

    Best regards.


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  02-20-2008, 12:38 AM 114154 in reply to 111645

    Re: Unable to parse form XML from PDF file

    Dear dijiles,

    A good news is that this problem has been solved. It will be included in the coming new release.

    Best regards.


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  03-10-2008, 9:56 AM 116988 in reply to 114154

    Re: Unable to parse form XML from PDF file

    Hi,

    Please try new version 3.0.0.0.

    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  • View as RSS news feed in XML