Print Page | Close Window

Can't merge two pdfs

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=1077
Printed Date: 29 Apr 25 at 11:38AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Can't merge two pdfs
Posted By: hoogie76
Subject: Can't merge two pdfs
Date Posted: 05 May 09 at 2:23PM
Trying to merge two single page pdf files of the same type into 1 pdf file with two pages.
 
Once merged, data from page 1 is showing up on partially on page 2. If you look at the pdf files individually they are fine.
 
I've tried opening the docs, flattening the fields and resaving the files to new names but still have the same problem.
 
I've tried mergefiles, mergefilelist and mergefilelistfast, all with the same results.
 
Anyone know how to resolve the issue?
 
I have sample docs and code if anyone wants me to send them.
 
Thanks, Mark



Replies:
Posted By: Ingo
Date Posted: 06 May 09 at 1:51AM
Hi Mark!

Where can we find the two files and where is the result?
What's about your relevant code part in this case?
Perhaps it's possible for you to load them anywhere up and post the links here. Then we can see ...

Here is a sample about how to merge two files:
    QP := TQuickPDF712.Create;
    try
       QP.UnlockKey('MyKey');
       fa1 := FileGetAttr(Trim(starting_file));
       FileSetAttr(Trim(starting_file), faArchive);
       QP.LoadFromFile(starting_file);
       QP.Unencrypt;
       msd := QP.SelectedDocument;
       fa2 := FileGetAttr(Trim(next_file));
       FileSetAttr(Trim(next_file), faArchive);
       QP.LoadFromFile(next_file);
       QP.Unencrypt;
       md0 := QP.SelectedDocument;
       QP.SelectDocument(msd);
       QP.MergeDocument(md0);
       QP.SetInformation(0,'1.4');                    //erforderliche PDF-Version
       QP.SetInformation(5,'My Super App');           //Creator
       QP.SetInformation(6,'The fantastic QuickPDF'); //Producer
       QP.SaveToFile(The_new_file);

    finally
       QP.RemoveDocument(msd);
       FileSetAttr(Trim(starting_file), fa1);
       FileSetAttr(Trim(next_file), fa2);
       QP.Free;
    end;

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