Print Page | Close Window

Outlines being destroyed when merging files

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1087
Printed Date: 25 Jun 25 at 5:53PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Outlines being destroyed when merging files
Posted By: BSing
Subject: Outlines being destroyed when merging files
Date Posted: 17 May 09 at 11:59AM
Hi,

Is there a way to merge two files and keep the outline/bookmarks from each intact? When I call the MergeFiles function with files that have outlines, the resulting file has none.

I'm using PHP to call the library.


       $result = $qp->MergeFiles($filetoadd,$filetobeaddedto,  $resultfilename);


Any hints/examples would be appreciated.

Thanks!

Brian





Replies:
Posted By: BSing
Date Posted: 17 May 09 at 4:17PM
I also tried the MergeDocument function, as follows:


    // Based on example from [[[ http://www.quickpdf.org/forum/forum_posts.asp?TID=1077 ]]]
    $qp->LoadFromFile($filetoadd);
    $newadditionpagecount=$qp->PageCount; // Get the page count
    //$qp->Unencrypt;
    $msd = $qp->SelectedDocument;
    $qp->LoadFromFile($filetobeaddedto);
    //$qp->Unencrypt;
    $md0 = $qp->SelectedDocument;
    $qp->SelectDocument($msd);
    $qp->MergeDocument($md0);
    $qp->SaveToFile($resultfilename);
   


Still no bookmarks in $resultfilename...


Posted By: Ingo
Date Posted: 18 May 09 at 1:43AM
Hi!

How should this go?
Perhaps in both documents (with perhaps the same pagecount) there are outlines linked to the same pagenaumbers? I think this will produce problems over problems.
You should use the get...outline-functions before merging and the set...outline-functions after merging.

Cheers, Ingo


Posted By: BSing
Date Posted: 19 May 09 at 10:43PM
Acrobat has a function that it adds to explorer that allows the merge of PDFs with a right-click. When PDFs are merged this way, the bookmarks in both of them come through. iirc, each file's bookmarks are underneath a parent bookmark that's the name of the file. I was hoping that merge did that as well. Is that possible?


Posted By: Ingo
Date Posted: 20 May 09 at 12:38AM
Hi!

Please keep in mind that we're talking here about the 1 mb of QuickPDF - not about the 100 mb installation of the adobe reader ;-)

I've told you that there are functions to do it yourself manually with QuickPDF.

Cheers, Ingo


-------------
Cheers,
Ingo




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk