Printer Driver Issue related to MS-Word 2007

Hi,

I am working on monolithic printer drivers for Windows Vista and am
having a peculiar problem while printing with MS-Word 2007 (latest
version of Office 2007). In Word 2007, there is an additional control
to set the paper size of the document (See Page Layout Tab) .

When trying to print a document of a paper size, say B4, onto a smaller
paper size, say A4 (GDI scaling it to fit the smaller paper size ) ,
the word document gives the following warning before printing : " The
margins of section 1 are set outside the printable area of the page
". The strange thing is that this problem is reproducible if the paper
size in the document is set using the ‘size’ option in Word’s ‘Page
Layout’ tab. If the paper size is set up from ‘Page Setup’ dialog (as
was done in earlier versions of MS-Word), the problem is not
reproducible. This problem is also not reproducible with earlier
versions of MS-Office.

On debugging, I observed that :

* If paper size is set in MS-word using ‘Page Setup’ dialog,
DrvDeviceCapabilities and DrvDocumentPropertySheets entrypoints are not
called and dmPaperSize in the public devmode structure is getting
properly updated .
* If paper size is set in MS-word using ‘size’ option in ‘Page
Layout’ tab, DrvDeviceCapabilities and DrvDocumentPropertySheets
entrypoints are not called. Hence, dmPapersize is not updated .

Any inputs on this will be very helpful

Thanks in advance

Shyamala Sarang