Print Page | Close Window

Print with QuickPDF Lite

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1645
Printed Date: 06 May 25 at 11:49AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Print with QuickPDF Lite
Posted By: Compucents
Subject: Print with QuickPDF Lite
Date Posted: 17 Nov 10 at 12:57PM
Can I print documents with PDF Lite?  My trial ran out on the full version and I need to demo my app to management today.  I'm getting error messages with VB.net 3.5 code using GetDefaultPrinterName and PrintDocument members?  They are in the 7.19 user guide as available functions, but maybe I'm using the wrong syntax?  The PDFLibrary.LoadFromFile() function works OK so it looks like the ActiveX component is installed and registered properly.
 
The error message I get is:  
Public member 'GetDefaultPrinterName' on type 'PDFLibrary' not found. 
 
If I hard code the printer name as a string then the error message goes to:
Public member 'PrintOptions' on type 'PDFLibrary' not found. 
 
If I hard code the printer options as an integer then the error message goes to:
Public member 'PrintDocument' on type 'PDFLibrary' not found. 
 
CODE Example:

Dim PDFLibrary As QuickPDFLite0719.PDFLibrary

PDFLibrary = CreateObject("QuickPDFLite0719.PDFLibrary")
 
PDFLibrary.LoadFromFile(print_document)
PDFLibrary.PrintDocument(PDFLibrary.GetDefaultPrinterName, start_page, PDFLibrary.PageCount, PDFLibrary.PrintOptions(1, 0, "Document"))

PDFLibrary = Nothing



Replies:
Posted By: Ingo
Date Posted: 17 Nov 10 at 4:07PM
Hi!
 
Try "GetDefaultPrinterName" before and use only the result
with PrintDocument. Perhaps it helps?
 
I'm doing it this way with success:
// . . .
QP.LoadFromFile(Edit1.text);
prName := QP.GetDefaultPrinterName();
prOptions := QP.PrintOptions(2, 0, Edit1.Text);
QP.PrintDocument(prName, p1, p2, prOptions);
// . . .
Cheers and welcome here,
Ingo
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk