[
https://issues.apache.org/jira/browse/PDFBOX-5622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17733347#comment-17733347
]
Tilman Hausherr commented on PDFBOX-5622:
-----------------------------------------
Please enter the version in the version field.
> Convert the same page,Why are temp files getting bigger and bigger
> ------------------------------------------------------------------
>
> Key: PDFBOX-5622
> URL: https://issues.apache.org/jira/browse/PDFBOX-5622
> Project: PDFBox
> Issue Type: Bug
> Reporter: liu
> Priority: Major
> Attachments: screenshot-1.png, screenshot-2.png, 复杂cad-转图片耗时.pdf
>
>
> demo:
> {code:java}
> public static void main2(String[] args) throws IOException,
> InterruptedException {
> File file = new File("D:\\file/复杂cad-转图片耗时.pdf");
> final PDDocument load = PDDocument.load(file,
> MemoryUsageSetting.setupMixed(1048576)
> .setTempDir(new File("D:\\test")));
> for (int i = 0; i < 1000; i++) {
> PDFRenderer renderer = new PDFRenderer(load);
> int pageIndex = 6;
> float scale = 2f;
> try {
> 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();
> }
> }
> } catch (Exception e) {
> System.out.println(e);
> }
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]