PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: Empty-Page
   PostPosted: 27 Jun 2020, 07:06 
Hi,

i like to convert a user dashboard to pdf. I tried with pd4ml but. The pdf-file was generated but it was an empty page. There were no error displayed. Maybe somone can help me.

I downloaded the last build today.

Code:
java.io.FileOutputStream fos = new java.io.FileOutputStream(pdfDir + outputPDFFile);
PD4ML pd4ml = new PD4ML();
p4ml.clearCache();
pd4ml.disableHyperlinks();
pd4ml.enableTableBreaks(true);
pd4ml.enableImgSplit(false);
pd4ml.adjustHtmlWidth();
pd4ml.interpolateImages(true);
pd4ml.setCookie("secret_userid", userid);
         
Dimension formatPage = PD4Constants.A4;
try{         
   pd4ml.render("https://myurl.com/pdf.php?a=dashboard", fos);
}catch (UnknownHostException e){
   System.out.println("UnknownHost");
}


If i open https://myurl.com/pdf.php?a=dashboard in a browser the page will be displayed but the pdf file is empty.


  Subject: Re: Empty-Page
   PostPosted: 29 Jun 2020, 17:21 
As the first troubleshooting step try to switch debug on: pd4ml.enableDebugInfo() and inspect STDOUT/server's log for possible error messages.



[Reply]     [ 2 posts ] 

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