PDF Printer Paper Size - set through COM interface

General usage of the PDF Printer.

Moderator: jr

Post Reply
spaul
Posts: 2
Joined: Fri May 15, 2009 8:28 am

PDF Printer Paper Size - set through COM interface

Post by spaul »

Hi

I am facing a problem with PDF paper size.

When I export my document to PDF it automatically set the Page Size to (8.50 x 11.0 in) Letter.

But I want to set it dynamically (through COM interface) because some of my documents are in A4, Letter, B4, B5 etc.

Is there any way to set it before creating the PDF?

Waiting for your reply.

Regards
Subrata
jr
Site Admin
Posts: 500
Joined: Sun Mar 26, 2006 12:28 pm

Re: PDF Printer Paper Size - set through COM interface

Post by jr »

The page size is set by the printing program and NOT though the ini files or COM object.

Please follow the link below and read the example code.

http://www.biopdf.com/guide/examples/page_size/

Regards,
Jacob
spaul
Posts: 2
Joined: Fri May 15, 2009 8:28 am

Re: PDF Printer Paper Size - set through COM interface

Post by spaul »

Hi Jacob

Thanks for your valuable reply.

Your example code is working fine in my place and I got what you want to say.

But in our case the scenario little bit different.

Let me explain it -

First of all my application is written in VFP (Visual FoxPro ver 9.0). My printing routine is designed by using Device Context (CDC) technique and for that I have created a VC++ DLL.

When I send my document for printing, a Print dialog box appears and from where I can select my desired printer along with I can also select the paper size from it's properties button.

But in case of PDF printer when I want to sent my document to PDF - I do not fire the PDF printer dialog (from where I can define file name, location etc etc) instead of that I defined all those properties through COM interface.

When I send my document I know it's Paper Size. Here I just want to set the Paper Size dynamically (through COM interface) for the PDF Printer.

Is it possible?

Waiting for your reply.

Regards

Subrata
jr
Site Admin
Posts: 500
Joined: Sun Mar 26, 2006 12:28 pm

Re: PDF Printer Paper Size - set through COM interface

Post by jr »

I think that you need to set the paper size for your DC (device context) before the print dialog opens. The page size cannot be changed through the COM object since it is the printing program that specifies the output size.

Regards,
Jacob
Post Reply