CustomPrinter - number of copies is ignored @print
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=3071
Printed Date: 06 May 25 at 11:47AM Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com
Topic: CustomPrinter - number of copies is ignored @print
Posted By: nemo99
Subject: CustomPrinter - number of copies is ignored @print
Date Posted: 13 Feb 15 at 6:48PM
Dear All,
When printing with DQPL, I am not able to change the number of copies. I use the NewCustomPrinter and SetupCustomPrinter functions as suggested in the documentation. Every other settings (page width, height, orientation, etc.) work fine, except the number of copies. Number of copies seems to be ignored, whatever number I set, only 1 copy is printed.
Has anybody faced with this problem, could it be a bug in DQPL? Or do I miss something? Any ideas? I use the below modified sample code for testing and DebenuPDFLibraryDLL1113.dll.
Thank you!
private void btnPrintDocument_Click(object sender, EventArgs e) { // This function prints a document
// Setup general parameters string fileName = @"c:\temp\test.pdf";
// Check to see if the library has been successfully unlocked if (qp.Unlocked() == 1) { // Load the document that you want to print into memory int docID = qp.LoadFromFile(fileName, "");
// Set the paramters for the PrintDocument function string PrinterName = qp.GetDefaultPrinterName(); int StartPage = 1; // Set first page number int EndPage = qp.PageCount(); // Set last page number
// Set the paramters for the PrintOptions function int PageScaling = 0; int AutoRotateCenter = 0; string Title = fileName;
// Assign the options for printing to an int variable int Options = qp.PrintOptions(PageScaling, AutoRotateCenter, Title); string printerName = qp.NewCustomPrinter("Adobe PDF"); //string printerName = qp.NewCustomPrinter("Xerox Phaser 3117"); //qp.SetupCustomPrinter(printerName, 0, 0); qp.SetupCustomPrinter(printerName, 2, 500); qp.SetupCustomPrinter(printerName, 3, 1000); qp.SetupCustomPrinter(printerName, 4, 5); qp.SetupCustomPrinter(printerName, 11, 2); // Print the document with the required paramters and options specified qp.PrintDocument(printerName, StartPage, EndPage, Options);
// Remove document from memory qp.RemoveDocument(docID); } else { // If library could not be unlocked warn the user MessageBox.Show("License key could not be validated. The library was not unlocked."); } }
|
|
Replies:
Posted By: nemo99
Date Posted: 17 Feb 15 at 11:35AM
It seems nobody has issues with this? If you specify the number of copies then the pdf is printed in the specified number of copies and not in only one?
Strange, because I have extended the sample code which I guess should work fine. And changed the number of copies in the same way as the other parameters which work fine.
Could it be that the used printer doesn't support this?? Would be strange, too. I have tried with the adobe PDF printer and with my Xerox printer, but it works in the same way on both. (More precisely doesn't work on either :) ).
Thanks
|
|