setting printer papersize programmatically

The PDF Creator .NET Library enables you to create secure PDF documents on the fly and to view, print and process existing PDF documents. If you have any questions about PDF Creator .Net, please post them here.
Post Reply
Sibi
Posts: 1
Joined: Wed Feb 17 2010

setting printer papersize programmatically

Post by Sibi » Mon Feb 22 2010

Hello Amyuni forum,

we are evaluating the PDFcreator 4.0 component for .NET right now and have one issue which is between ordering it or going a different way...
Here is the scenario:

We are getting (multi- and singlepage) A0 to A4 CAD PDFs and need them to programmatically print those out on plotters or printers. So far we had good luck with the PDFCreator component. The only issue is how can we set papersize of the printer/plotter for the given PDF? There is a call to pdfcreator.document.PrinterSetup() which does the job, but we need to do this programmatically without involving the user or showing a dialog.
We have seen that other Amyuni products are able to set the printers paper size, but couldn't locate the right "switch" on the PDFCreator component.
Is there any trick to setting printer paper size programmatically with the PDFCreator component?

Any help would be appreciated.

Thanks!

regards,
Sibi

mist83
Posts: 4
Joined: Fri Apr 23 2010

Re: setting printer papersize programmatically

Post by mist83 » Tue May 11 2010

I don't know if this helps, but the following code:

Code: Select all

IacDocument document = new IacDocument();
document.PageWidth = 100;
document.PageLength= 500;
will set the document's height and width. Note that the HEIGHT (Y) is set by the PageWidth property, and the WIDTH (X) is set by the PageLength property. I know this may not be intuitive, but it's the way the properties work on acPDFCreator.Net.dll version 4.0.0.8.

Mick

Post Reply