PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: PDF Merge: Parsing of PDF failed - JAVA
   PostPosted: 16 Oct 2020, 13:31 
Hi, we're running into an issue where we can't merge and render a PDF in a JAVA application.

Java 1.8.0_112
PD4ML 3.11.4fx1

Using the following code and the attached file.
Code:
      String lHtml = "<!doctype html>\n" +
                     "<html>\n" +
                     " <head> \n" +
                     "  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"> \n" +
                     "  <meta http-equiv=\"Expires\" content=\"0\"> \n" +
                     "  <meta name=\"robots\" content=\"noindex, nofollow\">\n" +
                     "  <title>PD4ML</title>\n" +
                     "  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n" +
                     " </head> \n" +
                     " <body class=\"bodyDefault\">\n" +
                     "\t<p>This is a PD4ML testcontent message</p>\n" +
                     " </body>\n" +
                     "</html>";
      StringReader lHtmlReader = new StringReader( lHtml );
      InputStream lInputfile = new FileInputStream( "D:\\pd4ml_input.pdf" );
      OutputStream lOutputStream = new FileOutputStream( "D:\\pd4ml_output.pdf" );
      PD4ML lRender = new PD4ML();
      lRender.setPageSize( PD4Constants.A4 );
      lRender.setPageInsets( new Insets( 10,10,10,10 ) );
      lRender.setHtmlWidth( 780 );
      lRender.merge( lInputfile, 1, -1, false);
      lRender.render( lHtmlReader, lOutputStream );


The error we're encountering is following:
Code:
java.io.IOException: PDF Merge: Parsing of PDF failed: org.zefer.pd4ml.npdf.parser.obj.h cannot be cast to org.zefer.pd4ml.npdf.parser.obj.e
   at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)
   at org.zefer.pd4ml.PD4ML.render(Unknown Source)


Any help would be appreciated!


Attachments:
pd4ml_input.pdf [234.39 KiB]
Downloaded 267 times
  Subject: Re: PDF Merge: Parsing of PDF failed - JAVA
   PostPosted: 16 Oct 2020, 13:49 
The issue is not reproducible with PD4ML v4. We'll check if the v4 PDF parser changes can be also copied to PD4ML v3 branch.


  Subject: Re: PDF Merge: Parsing of PDF failed - JAVA
   PostPosted: 10 Nov 2020, 11:45 
Hi,

Is there any news yet about copying these changes back?


  Subject: Re: PDF Merge: Parsing of PDF failed - JAVA
   PostPosted: 23 Nov 2020, 09:52 
Hi,

Any news yet?
We're eagerly awaiting this fix so we can print our documents again.


  Subject: Re: PDF Merge: Parsing of PDF failed - JAVA
   PostPosted: 24 Nov 2020, 12:09 
Hi! The PDF parsing issue is already fixed, but the release is pending due to an unresolved issue by one of our customers. (It is not clear yet if it is a bug in our code or a deployment issue).

We'll send you a beta version download link by email, so you can test PDF parse/merge functionality in the meantime.


  Subject: Re: PDF Merge: Parsing of PDF failed - JAVA
   PostPosted: 12 Jan 2021, 10:28 
Hi,

Is there any news still on when we can expect a release version?



[Reply]     [ 6 posts ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share