[
https://issues.apache.org/jira/browse/PDFBOX-5721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17803949#comment-17803949
]
ASF subversion and git services commented on PDFBOX-5721:
---------------------------------------------------------
Commit 1915114 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1915114 ]
PDFBOX-5721: ignore EOF if it is before just data
> 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
> Affects Versions: 2.0.30
> Reporter: liu
> Priority: Major
> 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: [email protected]
For additional commands, e-mail: [email protected]