Gabriel Diaz created PDFBOX-2915:
------------------------------------
Summary: PDPage.convertToImage special symbols
Key: PDFBOX-2915
URL: https://issues.apache.org/jira/browse/PDFBOX-2915
Project: PDFBox
Issue Type: Bug
Components: PDModel
Affects Versions: 1.8.7
Reporter: Gabriel Diaz
When converting a PDPage whit special symbols i.e: (Math Integral, Math SUM)
the generates image doesn't have the symbol.
Simple app that reproduces the issue:
{code:title=App.java|borderStyle=solid}
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDPage;
public class App {
public static void main(String[] args) {
File pdfFile = new File("C:\\Testing\\Symbols.pdf");
PDDocument inputPDF;
try {
inputPDF = PDDocument.load(pdfFile);
List<PDPage> allPages =
inputPDF.getDocumentCatalog().getAllPages();
int tmp = 1;
for (PDPage page : allPages) {
File outputfile = new File("C:\\Testing\\image"
+ tmp + ".png");
ImageIO.write(page.convertToImage(), "png",
outputfile);
System.out.println("Image Created -> " +
outputfile.getName());
}
} catch (IOException ex) {
Logger.getLogger(App.class.getName()).log(Level.SEVERE,
null, ex);
}
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]