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 > General Discussion
  New Posts New Posts RSS Feed - Printing without knowing page numbers?
  FAQ FAQ  Forum Search   Register Register  Login Login

Printing without knowing page numbers?

 Post Reply Post Reply
Author
Message
corecomps View Drop Down
Beginner
Beginner


Joined: 16 Sep 09
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote corecomps Quote  Post ReplyReply Direct Link To This Post Topic: Printing without knowing page numbers?
    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
Back to Top
Paddy View Drop Down
Beginner
Beginner


Joined: 24 Mar 10
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Paddy Quote  Post ReplyReply Direct Link To This Post Posted: 29 Mar 10 at 6:03AM

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!

Back to Top
corecomps View Drop Down
Beginner
Beginner


Joined: 16 Sep 09
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote corecomps Quote  Post ReplyReply Direct Link To This Post Posted: 31 Mar 10 at 4:09AM
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.
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