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 2019/02/27 16:26:00 UTC

[jira] [Commented] (PDFBOX-4475) PDFMergerUtility is very slow, almost in dead loop

    [ https://issues.apache.org/jira/browse/PDFBOX-4475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16779482#comment-16779482 ] 

ASF subversion and git services commented on PDFBOX-4475:
---------------------------------------------------------

Commit 1854470 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1854470 ]

PDFBOX-4475: optimize by using separate Set instead of calling Map.containsValue()

> PDFMergerUtility is very slow, almost in dead loop
> --------------------------------------------------
>
>                 Key: PDFBOX-4475
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4475
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Derek Liu
>            Priority: Critical
>         Attachments: TourInventory_TourInventory_report.pdf, image-2019-02-27-15-43-42-304.png, screenshot-1.png
>
>
> When use PDFMergerUtility to merge PDF file, it is very slow to merge the struct tree. It seems that it in a dead loop.
>  !image-2019-02-27-15-43-42-304.png! 
> Test code:
> {code}
> package com.test;
> import java.io.IOException;
> import org.apache.pdfbox.multipdf.PDFMergerUtility;
> public class TestMergeUtil {
>   public static void main( String[] args ) throws IOException {
>     PDFMergerUtility merger = new PDFMergerUtility();
>     merger.addSource( "D:\\probe\\TourInventory_TourInventory_report.PDF" );
>     merger.addSource( "D:\\probe\\TourInventory_TourInventory_report.PDF" );
>     merger.setDestinationFileName( "D:\\probe\\TourInventory_TourInventory_report_merged.pdf" );
>     merger.mergeDocuments();
>   }
> }
> {code}
> But after I comment bellow code, it can merge fast, but the merged PDF file size is very large.
>  !screenshot-1.png! 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org