Print Page | Close Window

Settting Page Size for Printing

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=3874
Printed Date: 25 Apr 24 at 10:19PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Settting Page Size for Printing
Posted By: bhchurch
Subject: Settting Page Size for Printing
Date 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



Replies:
Posted By: Ingo
Date Posted: 10 Jan 21 at 12:53PM
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



Posted By: bhchurch
Date Posted: 12 Jan 21 at 6:10PM
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.



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