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 - Page Numbering (Delphi)
  FAQ FAQ  Forum Search   Register Register  Login Login

Page Numbering (Delphi)

 Post Reply Post Reply
Author
Message
MartinS View Drop Down
Beginner
Beginner
Avatar

Joined: 26 Aug 10
Location: UK
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote MartinS Quote  Post ReplyReply Direct Link To This Post Topic: Page Numbering (Delphi)
    Posted: 26 Aug 10 at 4:26PM
I have been asked to write a procedure to merge multiple documents for a summary, so have used the MergeFiles in a loop so that it will work for any number of reports.
One of the issues i have come across first is that each PDF has it's numbering set on creation, i.e. 1 of x is written into the header of the report, so when merging, I get page 1 of 1 and then page 1 of 2 and 2 of 2.
Is there anyway this can be dealt with in the resulting merged PDF, or do I need to go back to the code that creates the indivdual reports and work out the numbering from there?
Any help or advice gratefully received.
Martin
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Aug 10 at 12:20PM
Hi Martin!

The numberring is textual stuff and it's fix in the documents.
My idea: Paste the relevant areas with colour white on white background,
take the new pagecount and create your own numberring.

Cheers and welcome here,
Ingo

Back to Top
MartinS View Drop Down
Beginner
Beginner
Avatar

Joined: 26 Aug 10
Location: UK
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote MartinS Quote  Post ReplyReply Direct Link To This Post Posted: 31 Aug 10 at 11:35AM
Hi
Thanks, that's what I guessed. Will have to look to see how i can re-work the numbering of the unmerged documents.
As an aside, I have been trying to figure out how I can find the total page count for my merged document. This is the code I am using to create my merged document, but in this example, where I only have two files to merge, it returns a PageCount of 1. My code was designed to be re-used for any number of documents, but if this is not the way it should be used, please let me know.

// create list to hold generated filenames...
sFileNameList := TStringList.Create;
// add store it in a list...
sFileNameList.Add('FilePathAndName1');
sFileNameList.Add('FilePathAndName2');
// loop through the list...
for I := 1 to sFileNameList.Count - 1 do
begin
// merge files together...
PDFLibrary.MergeFiles(sFileNameList[0], sFileNameList, sOutputFileName);
end;
// release the memory...
PDFLibrary.Free;
sFileNameList.Free;
Thanks
Martin
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 31 Aug 10 at 8:50PM
Hi!

If you're only using MergeFiles you won't get the complete pagecount.
Try AnalyseFile on the new merged file and directly after this GetAnalyseInfo...
then you'll get the new pagecount.

Cheers, Ingo


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