Details
Description
Pdfbox does not produce the correct fonts in the PNG file created with the following code and I get a lot of warnings:
PDDocument document = null;
try
{
document = PDDocument.load(pdfFile);
List pages = document.getDocumentCatalog().getAllPages();
int p = 0;
for (Object pobj : pages)
{
PDPage page = (PDPage) pobj;
++p;
BufferedImage bim = page.convertToImage();
// Test with output in memory, to see the size
ByteArrayOutputStream memout = new ByteArrayOutputStream();
boolean memoutok = ImageIO.write(bim, "png", memout);
if (!memoutok)
System.err.println ("mem write failed for " + p);
memout.reset();
memout.close();
// Test with output to png file
String fname = String.format("%s-%02d.png", prefix, p);
boolean foutok = ImageIO.write(bim, "png", new File(fname));
if (!foutok)
System.err.println ("file write failed for " + p);
....
Apr 26, 2012 2:41:11 PM org.apache.pdfbox.util.PDFStreamEngine processOperator
Information: unsupported/disabled operation: i
Apr 26, 2012 2:41:12 PM org.apache.pdfbox.util.PDFStreamEngine processOperator
Information: unsupported/disabled operation: ri
Apr 26, 2012 2:41:12 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
Warnung: Changing font on < > from <AMAKEA+TimesNewRoman> to the default font
Apr 26, 2012 2:41:13 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
Warnung: Changing font on < > from <AMAKEA+TimesNewRoman> to the default font
Apr 26, 2012 2:41:13 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
Warnung: Changing font on <O> from <AMAKME+Arial,Bold> to the default font
Apr 26, 2012 2:41:13 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
Attachments
Attachments
Issue Links
- depends upon
-
PDFBOX-490 Pdf Printing of text from embedded fonts
- Closed
- duplicates
-
PDFBOX-2818 Can't read the embedded font EPSSTR+ISOCPEUR,Italic
- Closed