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!
![]() |
Settting Page Size for Printing |
Post Reply ![]() |
Author | |
bhchurch ![]() Beginner ![]() Joined: 09 Jan 21 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 09 Jan 21 at 10:04PM |
I am using QuickPDF V18 under a trial license. I am trying to set the page size of a document to Letter before printing. I attempt to set the page size to letter as lResult = objQuickPDF.SetPageSize("Letter") with a result of a 1. However when I print the document (a single page document), my printer is still asking for A4 size paper.
This is part of an application that I am developing for a client. I do not want them to have to override the paper settings on their printers every time that they print a document. My question is, should I be setting other properties in the document to enable the SetPageSize to work. Thank you
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi bh,
with your settings so far you can print in letter format on any paper DIN A3, DIN A4, ... it depends on what's inside the paper box of the targeted printer ;-) If you need influence on the target printer and the used paper, there are four functions you should have an eye on. With GetPrinterNames you can get the list of installed printer drivers on the customer system: https://www.debenu.com/docs/pdf_library_reference/GetPrinterNames.php If there is already a printer driver on the customer system with settings for letter format you can use the returned name with PrintDocument and that's it. If not you should read further... With SetupCustomPrinter you can create a printer driver with the specifications you need: https://www.debenu.com/docs/pdf_library_reference/SetupCustomPrinter.php With NewCustomPrinter you can select the driver which you've just created: https://www.debenu.com/docs/pdf_library_reference/NewCustomPrinter.php With PrintDocument you can select the printer value returned by GetPrinterNames or NewCustomPrinter as well: https://www.debenu.com/docs/pdf_library_reference/PrintDocument.php Good luck cheers and welcome here, Ingo |
|
Cheers,
Ingo |
|
![]() |
|
bhchurch ![]() Beginner ![]() Joined: 09 Jan 21 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
Hi Ingo,
Shortly after I posted this request, I started checking the default settings on the printers created by VMWare on the two VMs that I am using to develop and test the application. Both printers were set to a paper size of A4 which did not get overridden by my setting the paper size fo the document. Once I updated the default settings on the printers, the documents printed without issue. However I will look into the CustomPrinter because I may need more control over the printer options. Thank you for your assistance Bruce.
|
|
![]() |
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