Print Page | Close Window

OT: Selecting Printer in Delphi

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=2947
Printed Date: 30 Apr 25 at 7:36AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: OT: Selecting Printer in Delphi
Posted By: JohnTMD
Subject: OT: Selecting Printer in Delphi
Date Posted: 31 Jul 14 at 5:50PM
When trying to print a PDF using the PDF SDK, the default printer is always selected.
This appears to be a Windows/Delphi issue.
Has anyone found a reasonable workaround?

TIA,
John
...
if PrintDialog1.Execute then
 begin
 ...
  PrintOptions := DPVActiveX1.DQPLPrintOptions(PageScaling,AutoRotate,Title);
  PrinterName := Printer.Printers[Printer.PrinterIndex];
///The dialog selected printer is never used- just the default.
  DPVActiveX1.DQPLPrintPages(PrinterName,PrintDialog1.Pages,PrintOptions);
end;
...



Replies:
Posted By: Ingo
Date Posted: 05 Aug 14 at 11:13AM
Hi John,
 
first you have to get the valid technical Name of the Printer you wanna use:
GetPrinterNames.
With NewCustomPrinter you can change the actual Printer.
And at the end with PrintDocument the new Printer will be used.
 
Cheers, Ingo
 


-------------
Cheers,
Ingo



Posted By: JohnTMD
Date Posted: 06 Aug 14 at 5:39PM
Thanks very much Ingo!
John



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