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!
![]() |
Unable to print Landscape |
Post Reply ![]() |
Author | |
RedOctober ![]() Team Player ![]() Joined: 12 Oct 10 Status: Offline Points: 26 |
![]() ![]() ![]() ![]() ![]() Posted: 31 Jul 11 at 4:51AM |
I'm using Delphi 7, QuickPDFLibrary 725, the TPrintDialog component that comes with Delphi, and I'm printing to a new Ricoh color printer.
Here is a code snippet: if prntDlg.Execute then begin ... qwk_pdf.PrintDocument(Printer.Printers[Printer.PrinterIndex], prntDlg.FromPage, prntDlg.ToPage, qwk_pdf.PrintOptions(0, 0, 'My Document')); ... In the print dialog that pops, I see all the options for the Ricoh printer including landscape. Yet when my user selects Landscape, the qwk_pdf always prints in Portrait mode. Now I see in the code, that there is no option to tell qwk_pdf to print in landscape mode. Can some one tell me how to get my qwk_pdf object to print in landscape mode when the user selects it from the TPrintDialog? Thanks in advance. |
|
![]() |
|
Rowan ![]() Moderator Group ![]() ![]() Joined: 10 Jan 09 Status: Offline Points: 398 |
![]() ![]() ![]() ![]() ![]() |
Hi RedOctober,
Would you be able to upload the PDF that you're having trouble printing somewhere that we could take a look at? Post the link here... Cheers, - Rowan.
|
|
![]() |
|
RedOctober ![]() Team Player ![]() Joined: 12 Oct 10 Status: Offline Points: 26 |
![]() ![]() ![]() ![]() ![]() |
Hi Rowan, please see:
http://jetlyt.ca/doc/PrintMeLandscape.pdf http://jetlyt.ca/doc/code_snippet.txt Code snippet is my real code, +full of comments. The Printer object is definitely set to poLandscape just prior to qwk_pdf.Print... |
|
![]() |
|
RedOctober ![]() Team Player ![]() Joined: 12 Oct 10 Status: Offline Points: 26 |
![]() ![]() ![]() ![]() ![]() |
Hi Rowan, links to files posted as you requested.
|
|
![]() |
|
RedOctober ![]() Team Player ![]() Joined: 12 Oct 10 Status: Offline Points: 26 |
![]() ![]() ![]() ![]() ![]() |
Hoping to get an answer to this question.
|
|
![]() |
|
Rowan ![]() Moderator Group ![]() ![]() Joined: 10 Jan 09 Status: Offline Points: 398 |
![]() ![]() ![]() ![]() ![]() |
Sorry for the delay.
If you want to print landscape then you need to use the customer printer functions. The SetupCustomPrinter function lets you choose whether the printing orientation is landscape or portrait. The SetupCustomPrinter function provides a variety of different settings for customizing your custom printer. To use the SetupCustomPrinter function you first need to create your customer printer using the the NewCustomPrinter function. Then you need to call the SetupCustomPrinter function. The trick to understanding this function is that you need to call it with the Setting parameter each time you want to add a new setting to your custom printer. So for example, if you want to add a setting that dictates how many copies should be printed you would use: SetupCustomPrinter(CustomPrinterName, 4, 10) Using the above setting will mean that 10 copies of the document that you send to this custom printer will be printed. If you wanted to then also adding a setting specifying the print quality you would use: SetupCustomPrinter(CustomPrinterName, 5, 4) This would now mean that 10 copies of the document that you send to this custom printer will be printed and all of the printed pages will have a draft print quality. Simply put you need to repeatedly the SetupCustomPrinter function until you've added all of the required settings. |
|
![]() |
|
RedOctober ![]() Team Player ![]() Joined: 12 Oct 10 Status: Offline Points: 26 |
![]() ![]() ![]() ![]() ![]() |
Ok, now I am pointed in the right direction. Thanks Rowan.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store