You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2019/02/27 16:42:00 UTC

[jira] [Resolved] (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:all-tabpanel ]

Tilman Hausherr resolved PDFBOX-4475.
-------------------------------------
       Resolution: Fixed
         Assignee: Tilman Hausherr
    Fix Version/s: 3.0.0 PDFBox
                   2.0.15

> 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
>          Components: Utilities
>    Affects Versions: 2.0.13, 2.0.14
>            Reporter: Derek Liu
>            Assignee: Tilman Hausherr
>            Priority: Major
>              Labels: merge, optimization
>             Fix For: 2.0.15, 3.0.0 PDFBox
>
>         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