You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2024/09/03 11:11:00 UTC
[jira] [Commented] (PDFBOX-5876) This jpeg2000 takes up a lot of memory, causing overflow.
[ https://issues.apache.org/jira/browse/PDFBOX-5876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17878828#comment-17878828 ]
ASF subversion and git services commented on PDFBOX-5876:
---------------------------------------------------------
Commit 1920421 from Tilman Hausherr in branch 'pdfbox/branches/3.0'
[ https://svn.apache.org/r1920421 ]
PDFBOX-5876: pass subsampling for second read
> This jpeg2000 takes up a lot of memory, causing overflow.
> ---------------------------------------------------------
>
> Key: PDFBOX-5876
> URL: https://issues.apache.org/jira/browse/PDFBOX-5876
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 3.0.2 PDFBox
> Reporter: liu
> Priority: Major
> Attachments: jpeg2000.pdf
>
>
> pdf:[^jpeg2000.pdf]
> JVM:-Xmx600m
> {code:java}
> //代码占位符
> public static void main(String[] args) throws IOException, InterruptedException {
> File file = new File("C:\\Users\\LYCIT\\Downloads\\jpeg2000.pdf");
> PDDocument pdf = Loader.loadPDF(file, IOUtils.createTempFileOnlyStreamCache());
> PDFRenderer renderer = new PDFRenderer(pdf);
> int numPages = 0;
> renderer.setSubsamplingAllowed(true);
> BufferedImage bi = renderer.renderImage(numPages, 0.5f);
> pdf.close();
> } {code}
--
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