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.CreateInstance(__uuidof(CDIntfEx::CDIntfEx));
spConverter->DriverInit(_bstr_t(c_sPDFDriverName));
spConverter->EnablePrinter(_bstr_t(c_sCompany), _bstr_t(c_sLicenceCode));
spConverter->SimPostscript = VARIANT_TRUE;
spConverter->ImageOptions = 1;
spConverter->PaperSize = 5;
spConverter->Orientation = 2;
spConverter->SetDefaultConfig();
//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.