OnEndPage

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
tdonovan
User
Posts: 61
Joined: Tue Jun 12, 2007 9:21 pm

OnEndPage

Post by tdonovan »

I have something that used to work that now seems to be broken.

Private WithEvents PDFPrinter As PXCComLib5.CPXCPrinter

Is not triggering the OnEndPage event. (Also won't trigger the OnStartPage event.) I am creating bookmarks and was using OnEndPage to increment a variable that was tracking what page for the bookmark (which is stored and then at the end added to the file after all pages are there).

Is there something I need to do to trigger this event.

Public Property CurrentPage As Integer = 0

Private Sub PDFPrinter_OnEndPage(JobID As Integer, nPageNumber As Integer) Handles PDFPrinter.OnEndPage
CurrentPage = nPageNumber
End Sub
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: OnEndPage

Post by Tracker Supp-Stefan »

Hello T Donovan,

Did this happen after a build update or did it just stop working at some point without any apparent change?
Have you tried the latest SDK builds available on the website?

Cheers,
Stefan
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: OnEndPage

Post by Ivan - Tracker Software »

OnStartPage/OnEndPage are asynchronous events - these events are not sent immediately when a new page is started or ended and it is not a good idea to use them to generate bookmarks.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
tdonovan
User
Posts: 61
Joined: Tue Jun 12, 2007 9:21 pm

Re: OnEndPage

Post by tdonovan »

Is there a better solution.

I am printing from Excel a series of spreadsheets that could be one or more pages (could be 1,000 pages total). I am trying to keep track of what page number each of these spreadsheets starts at so that once everything is printed, I can go back and add bookmarks. So I was trying to use the OnStartPage/OnEndPage to try and know what page the section started at to be able to go back and add the bookmarks. Any suggestions.

Thanks.
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: OnEndPage

Post by John - Tracker Supp »

For now at least this is not possible at creation time - you would need to use the XCpro40.dll functionality in either PDF-Tools SDK or the PDF-XChange PRO SDK to achieve this once the file has been created/saved and then re-opened using this dll.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
Post Reply