we currently run into printing issues (evaluated with callas pdfToolbox - digital print (b/w)) in combination with aspose.pdf 3.3 for java. Apparantly, there is some content inserted with 0pt fontsize in every generated pdf leading to problems in the post processing.
I have attached a demo pdf file (Test.pdf) and a screenshot from the output of the callas evaluation (Test_eval.png, blue cross). If a pdf is created without any content the occuring invisible ‘dot’ is associated with the defined default font size (e.g. 12pt). I have also attached pdf and evaluation result for this case. Is there any possibility to avoid this kind of embedded content or at least to avoid occurence of 0pt fontsize content?
Thanks in advance!
I finally figured out that the reason for the observed behaviour was the fact that I only put content inside a footer element. Therefore the “default” section remained empty. A simple workaround for me was to add a blank text to the first section.
Here is a code snippet which should reproduce the problem:
Pdf pdf = new Pdf();
// not essential to show behaviour
pdf.setDefaultFontName(“Times New Roman”);
Section sec = pdf.getSections().add();
//add this line to overcome the problem
//sec.getParagraphs().add(new Text(sec, “”));
HeaderFooter hf = new HeaderFooter(sec);
Text t = new Text(hf, “Test TEXT”);
I guess it seems quite uncommon but in my case it’s necessary to put only content inside the footer section…
//create a PdfViewer class instance.<o:p></o:p>
PdfViewer pdfviewer = new PdfViewer();
//open a Pdf file.
//set the Pdf file page parameters, the first 1 = 100%, the second 1 is the Pdf page number.
//If you want to print the Pdf file, the follow code is an example. The SimplePdfViewer shows the usage in detail.
//sets the default print scale - false.
//gets a printjob object.
PrinterJob printJob = PrinterJob.getPrinterJob();
//gets the default page.
PageFormat pf = printJob.defaultPage();
//sets the Paper object for this PageFormat.
//allows user to edit settings and select printing
//creates the printDialog.
boolean printFile = printJob.printDialog();
//close the Pdf file.
direct printing isn’t really the problem, I’m sorry if I wasn’t clear enough. The problem occurs in our pdf postprocessing by the application of a preflight check, which leads to an error due to the stated text section with 0pt font size.
I used callas pdfToolbox to visualize the problem to you. As mentioned above, the workaround is fine for me in the moment.