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!
Printing without knowing page numbers? |
Post Reply |
Author | |
corecomps
Beginner Joined: 16 Sep 09 Status: Offline Points: 8 |
Post Options
Thanks(0)
Posted: 28 Mar 10 at 9:53PM |
I'm seconds away from purchasing a license as well as releasing a very standard ASPX example to the community with a very common usage situation:
Person views PDF on prior page Person selects Printer name from drop down PDF prints on next page with a "ajax style animated gif" while it prints. One problem. I'm printing the PDF using the active x PrintDocument call from this page: Unfortunately it requires page number information. My use case is that 100% of the time the pageCount is never cared about or known. Is there a -1 or 0 or something that we can pass in as to not have to know about it? Function QuickPDF0718.PDFLibrary::PrintDocument(PrinterName As String,
StartPage As Long, EndPage As Long, Options As Long) As Long Edited by corecomps - 28 Mar 10 at 10:00PM |
|
Paddy
Beginner Joined: 24 Mar 10 Status: Offline Points: 8 |
Post Options
Thanks(0)
|
So do you want to print all pages in the document? I presume that's the case since any other option doesn't make sense from what you've described so far. You have to include a start page and an end page, but this is simple. The start page is 1 and to get the end page you simply call QP.PageCount() which will return the total number of pages in the document as an int -- the total number of pages is equal to the last page in the document. E.g. QP.PrintDocument(GetPrinterName, 1, QP.PageCount(), GetPrintOptions); HTH! |
|
corecomps
Beginner Joined: 16 Sep 09 Status: Offline Points: 8 |
Post Options
Thanks(0)
|
Thanks for the tip. I was looking for a quick way to get the page count. Obviously missed a very easy function call.
BTW< tested and works perfectly. I'll release my demo code shortly.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store