Print Page | Close Window

Print settings like duplex, punch ...

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=2594
Printed Date: 25 Jun 25 at 1:12PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Print settings like duplex, punch ...
Posted By: iquser
Subject: Print settings like duplex, punch ...
Date Posted: 08 Apr 13 at 4:52PM
We want set print options like duplex, punch, stable and media source (paper cassette).
I use the PrintDocument methode, but I can't find a methode for set the print options.
We use the DLL Version with Embarcadero C++.
Thank you for your support.
Markus



Replies:
Posted By: Ingo
Date Posted: 08 Apr 13 at 8:54PM
Hi Markus!

You should setup local printer installations with the needed properties
and then you can call these "printer variants" via PrintDocument.
Another idea:
You can use SetupCustomPrinter from QuickPDF:
The function:
http://www.quickpdflibrary.com/help/quickpdf/SetupCustomPrinter.php
How to:
http://www.quickpdflibrary.com/faq/how-do-i-use-the-setupcustomprinter-function.php

Cheers and welcome here,
Ingo

 


Posted By: AndrewC
Date Posted: 10 Apr 13 at 8:49AM
Markus,

QP.SetupCustomPrinter is the first place to start for Duplex, Copies.  

In QPL 8.xx and 9.xx  we have the following functions.

http://www.quickpdflibrary.com/help/quickpdf/GetPrinterDevModeToString.php - http://www.quickpdflibrary.com/help/quickpdf/GetPrinterDevModeToString.php
http://www.quickpdflibrary.com/help/quickpdf/SetPrinterDevModeFromString.php - http://www.quickpdflibrary.com/help/quickpdf/SetPrinterDevModeFromString.php

Many printer drivers require the use a custom DevMode string.  The idea is that you setup you printer driver in Windows to select the required tray, stapler, duplex etc. as default.  You then run your QPL program and call GetPrinterDevModeToString and then save that string to a file.  Now each time you want to select that tray you create your custom printer, load the string from the file and call SetPrinterDevModeFromString and this will select the correct tray, stapler and duplex settings.

This link will explain things in more detail.

http://nicholas.piasecki.name/blog/2008/11/programmatically-selecting-complex-printer-options-in-c-shar/ - http://nicholas.piasecki.name/blog/2008/11/programmatically-selecting-complex-printer-options-in-c-shar/

As of 9.14 it is possible to combine SetupCustomerPrinter and the DevMode functions.

Andrew.



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