I am using Apache PDFBox 1.8.6 to silent print pdf bytes stored in the database.
The print output by PDFBox does not display data in the font I have used in the PDF. The PDF(exported from Crystal reports) has Embedded Subset True Type fonts (Times Roman, Arial Bold) etc. While searching, I found this link from stack overflow which says "PDFBox is not able to parse embedded subsets of TrueType fonts." But it was dated Aug 2012 and I am using latest version of PDFBox. It seems the problem persists in the current version.
When I silent print the bytes, all the characters are displayed in Helvetica font(not sure how this is being applied).
InputStream myInputStream = new ByteArrayInputStream(myBytes);
PDDocument doc = PDDocument.load(myInputStream);
// TODO : Apply custom fonts??
doc.silentPrint();
- Is there a way to solve this issue by loading fonts programmatically and applying it to the loaded pdf document?