You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "liu (Jira)" <ji...@apache.org> on 2023/11/28 06:04:00 UTC
[jira] [Created] (PDFBOX-5721) The embedded font DroidSansFallbackFull reports an error when parsing, and finally uses lastResortFont, resulting in garbled fonts.
liu created PDFBOX-5721:
---------------------------
Summary: 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
Attachments: CMISG Mutual NDA_Enepath_09Nov23_signed6.pdf, 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-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org