Print Page | Close Window

How Can I Get the page's Origin Paper Size?

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=1312
Printed Date: 22 Nov 24 at 5:40PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: How Can I Get the page's Origin Paper Size?
Posted By: melsme
Subject: How Can I Get the page's Origin Paper Size?
Date Posted: 11 Jan 10 at 4:48AM

The function's Name that I need is

"Choose Paper Source by PDF Page size"
 
in Abode Acrobat Reader's Print Dialog Form.
 
My Application Collect PDf Files in FTP Server, Merge it into One PDF File and Print it.
 
PDf File's Paper size is Various(A4, A3, A0) but When I Print it,  
 
All PDF Pages are Printed in Just One Type (default A4)
 
If I set Paper Size to A3 like this -> PDF.SetupCustomPrinter(aCustomPrinter,  1, 8 );
All Pages are Printed A3
 
If I set Paper Size to A4 like this -> PDF.SetupCustomPrinter(aCustomPrinter,  1, 9 );
All Pages are Printed A4
 
How Can I Get the page's Origin Paper Size?
 
Show Me Some Example Code PLEASE......



Replies:
Posted By: Ingo
Date Posted: 11 Jan 10 at 6:41AM
Hi Choi!

With PageHeight and PageWidth from the section "Page Properties":
http://www.quickpdflibrary.com/help/quickpdf/PageProperties.php
you can determine what's the size of the selected document and then you can set the printer properties.

Cheers and welcome here,
Ingo



Posted By: melsme
Date Posted: 12 Jan 10 at 1:30AM
Thanks Ingo.
 
But I 've already read your reference that you linked and it doesn't help my problem.
 
I Merged two files First A3 and A4.
 
And when I Print it in Abode Acrobat Reader with "Choose Paper Source by PDF Page size"  checked, One A3 and One A4 Paper Printed. it's correct.
 
but QuickPDF, Two A4 Papers comes out always.
( if I Set paper size A3, Two A3 Papers Come out.)
 
I Want Each Page's Original Paper Size like Acrobat Reader's "Choose Paper Source by PDF Page size"   Option.
 
I Tested Like below
==============================================================
                          PDF.SetupCustomPrinter(aCustomPrinter,  1, DMPAPER_USER );
                          PDF.SetupCustomPrinter(aCustomPrinter,  4, frm_EDIC012R.wkNowPrintCount );
                          PDF.SetupCustomPrinter(aCustomPrinter,  5, frm_EDIC012R.wkQuality );
                          PDF.SetupCustomPrinter(aCustomPrinter,  8, frm_EDIC012R.wkCollate );
                          PDF.SetupCustomPrinter(aCustomPrinter,  9, DMBIN_AUTO );
// it Doesn't Work.
                          PDF.SelectPage(1);
                          PDF.SetPageDimensions(16.53 * constInch, 11.69 * constInch);
                          PDF.SelectPage(2);
                          PDF.SetPageDimensions(8.26 * constInch, 11.69 * constInch);
// it Doesn't Work too.
                          PDF.SelectPage(1);
                          PDF.SetPageSize('A3 Landscape');
                          PDF.SelectPage(2);
                          PDF.SetPageSize('A4 Portrait');

aPrintOption := PDF.PrintOptions(0, 0, 'Some Code');
PDF.PrintDocument(aCustomPrinter, 1, PDF.PageCount, aPrintOption);
==============================================================
 
anything that I missed? or did wrong?

Please Let me know the answer......
 


Posted By: Ingo
Date Posted: 12 Jan 10 at 6:10AM
Hi!

If it's ONE new document then it's clear.
Before you've written from different dimensions of files and the printer settings...
So what you can do?
Starting a print order you can copy each page of the document (one after the other) into a single new temporary document, get the page dimensions, make the printer settings and do the printout for each page. This could be your "choose paper source by page size". I don't think that you have alternative options with QuickPDF?

Cheers, Ingo



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