You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opening empty generated .pdf on Windows 10 with Adobe Acrobat Reader DC (15.016.20045) results in a warning "The font 'Dialog.plain' contains bad /BBox."
Repro:
// Gradle dependency: testCompile 'de.erichseifert.vectorgraphics2d:VectorGraphics2D:0.10'@TestpublicvoidBBoxError() throwsIOException
{
PDFGraphics2Dpdf = newPDFGraphics2D(0.0, 0.0, 100.0, 100.0);
System.out.println(pdf.getFont());
// Prints out: java.awt.Font[family=Dialog,name=Dialog,style=plain,size=12]try (FileOutputStreamfile = newFileOutputStream("test1.pdf"))
{
file.write(pdf.getBytes());
}
// Open test1.pdf with Adobe Acrobat Reader DC (15.016.20045) on Windows 10// See a dialog box: "The font 'Dialog.plain' contains bad /BBox."pdf.setFont(newFont(Font.SANS_SERIF, Font.BOLD, 14));
System.out.println(pdf.getFont());
// Prints out: java.awt.Font[family=SansSerif,name=SansSerif,style=bold,size=14]try (FileOutputStreamfile = newFileOutputStream("test2.pdf"))
{
file.write(pdf.getBytes());
}
// Open test2.pdf with Adobe Acrobat Reader DC (15.016.20045) on Windows 10// See a dialog box: "The font 'Dialog.plain' contains bad /BBox."// I.e. the message is the same, even though the font was changed.// Both test1.pdf and test2.pdf in "Document Propeties -> Fonts" show:// Dialog.plain// Type: TrueType// Encoding: Ansi// Actual font: Adobe Sans MM// Actual Font Type: Type 1
}
The text was updated successfully, but these errors were encountered:
The best way to solve this is probably by implementing a mapping to the list of Base 14 fonts as suggested in #33. Maybe explicitly setting a system font other than the standard font could help, too. I haven't tried that yet, though.
Thank you for your reply. Can you please provide some more information for the following case?
ProcessingPipeline g = null; g = new PDFGraphics2D(0, 0, 595, 842); chart.paint(g, view.getWidth(), view.getHeight()); try (FileOutputStream file = new FileOutputStream("test1.pdf")) { file.write(g.getBytes()); }
I am not really sure what font do you mean?
On the windows system, the prompt "The font 'Dialog.plain' contains a bad /BBox", and the error "An error exits on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to Correct the problem.", the drawn content can not be displayed.
Opening empty generated .pdf on Windows 10 with Adobe Acrobat Reader DC (15.016.20045) results in a warning "The font 'Dialog.plain' contains bad /BBox."
Repro:
The text was updated successfully, but these errors were encountered: