Selecting paper size

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
Posts: 1
Joined: Wed Sep 05 2007

Selecting paper size

Post by mags107 » Thu Sep 06 2007

Hi, I have a similar issue to several I have seen and I have tried the examples given, using setpapersize and setdefaultconfig. However this still does not succeed

We initialise the printer and set it as the active printer. We then call print on a word document object. The source document has a legal letter size and we are running on Office 2007. The pdf always defaults to A4.

Sample Code
CDIntfEx::ICDIntfExPtr spConverter;

spConverter->EnablePrinter(_bstr_t(c_sCompany), _bstr_t(c_sLicenceCode));
spConverter->SimPostscript = VARIANT_TRUE;
spConverter->ImageOptions = 1;
spConverter->PaperSize = 5;
spConverter->Orientation = 2;

//get a word document object representing the file to be converted to pdf

spDocument->PrintOut(&vtBackground, &vtFalse, &vtRange, &vtMissing, &vtMissing, &vtMissing, &vtMissing, &vtMissing, &vtRanges, &vtPageType, &vtPrintToFile);

I have also tried setting the paper size and calling the SetDefaultConfig immediately prior to the call to PrintOut.

Any ideas would be appreciated.

Post Reply