[ https://issues.apache.org/jira/browse/PDFBOX-5721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17803962#comment-17803962 ]
Andreas Lehmkühler commented on PDFBOX-5721: -------------------------------------------- The internal cmap mapping from the font is used due to the "missing" toUnicode mapping > The embedded font DroidSansFallbackFull reports an error when parsing, and > finally uses lastResortFont, resulting in garbled fonts. > ----------------------------------------------------------------------------------------------------------------------------------- > > Key: PDFBOX-5721 > URL: https://issues.apache.org/jira/browse/PDFBOX-5721 > Project: PDFBox > Issue Type: Bug > Components: FontBox > Affects Versions: 2.0.30 > Reporter: liu > Assignee: Tilman Hausherr > Priority: Major > Fix For: 2.0.31, 3.0.2 PDFBox, 4.0.0 > > Attachments: CMISG Mutual NDA_Enepath_09Nov23_signed6.pdf, > droid-bad.ttf, image-2024-01-07-13-19-32-380.png, image0.jpg > > > demo: > public static void main(String[] args) throws IOException, > InterruptedException { > File file = new File("C:\\Users\\LYCIT\\Downloads\\CMISG Mutual > NDA_Enepath_09Nov23_signed6.pdf"); > final PDDocument load = PDDocument.load(file, > MemoryUsageSetting.setupTempFileOnly() > .setTempDir(new File("D:\\fcs\\test"))); > PDFRenderer renderer = new PDFRenderer(load); > renderer.setSubsamplingAllowed(true); > int pageIndex = 0; > float scale = 2f; > BufferedImage bufferedImage = renderer.renderImage(pageIndex, > scale, ImageType.RGB); > FileOutputStream fos = null; > try { > fos = new FileOutputStream(new > File("D:\\fcs\\test/test6/image" + pageIndex + ".jpg")); > ImageIO.write(bufferedImage, "jpg", fos); > } finally { > if (fos != null) { > fos.close(); > } > } > Thread.sleep(6000000); > } > pdf:CMISG Mutual NDA_Enepath_09Nov23_signed6.pdf > garbled fonts:image0.jpg -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org