Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Merge Order with MergeDocument
  FAQ FAQ  Forum Search   Register Register  Login Login

Merge Order with MergeDocument

 Post Reply Post Reply
Author
Message
Luke View Drop Down
Team Player
Team Player
Avatar

Joined: 13 Aug 10
Location: USA
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote Luke Quote  Post ReplyReply Direct Link To This Post Topic: Merge Order with MergeDocument
    Posted: 09 Apr 14 at 12:00AM
I need to merge two pdf's and am using the sample code (below). My problem is that sometimes the resultant PDF is sFile1 and then sFile2 and then other times it is sFile2 and then sFile1. What determines the merge order? Is there a better way? TIA.

// Read First Document
FPDF.LoadFromFile( sFile1, '' );
iDoc1 := FPDF.SelectedDocument;

// Read Second Document
FPDF.LoadFromFile( sFile2, '' );
iDoc2 := FPDF.SelectedDocument;

// Merge the two documents.
FPDF.SelectDocument( iDoc1 );
FPDF.MergeDocument( iDoc2 );

// 08-Apr-2014 LMM: -> Save Result
FPDF.SaveToFile( sMergedFile );

Luke M. Miller

ResCorSoft, Inc.
Back to Top
Wheeley View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Oct 05
Location: United States
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wheeley Quote  Post ReplyReply Direct Link To This Post Posted: 09 Apr 14 at 10:37PM
Depending on what your ultimate goal is, you could use MergeFiles to merge the documents. Then you don't even have to open the files and the merge file list always contains the order of the files.

Wheeley

p.s.
Search the forum about merging to find example code.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store