MS Word always reports A4 Paper Size

Dear Sirs:

First I am sorry to use English here. I am currently working on a project regarding a printing charge system. I am doing this work using VB 2005 as my primary programming language. And I use P/Invoke to use the Win32 print spooler APIs. I have also patched the well-known dmCopies always returns 1 bux fix. That is fine so far. But that is not my problem now. I have encounteredd a Paper Size always return A4 bug and even Orientation and Duplex are both wrong too. But the Color value is correct. I have tested the case using HP Color LaserJet 5500 PCL 6 Driver. I do believe this bug is caused by MS Word(mine is Word 2002). Because I have tested the HP 5500 Printer with NotePad to print using Paper Size other than A4. The reported Paper Size is correct. Sometimes even on NotePad’s reported Paper Size is also wrong. But I have checked the spl file under the %windir%\system32\spool\PRINTERS directory. Because it is HP driver so it is using PCL printing language. I manuarly find out the reported Paer Size in the spl file that NotePad file’s printed. The Paper Size is correct. The Paper Size Code in spl file is encoded as hex as the following:

C0 …….F8 25 43
NotePad’s spl Paper Size code is correct. But When I use GetJob Win32 API, it is always reporting A4 paper size. Please note this. The API can’t get the PCL spl file’s paper size and orientation and duplex values correctly. But in the spl file(I use PCL to interpret its content, the paper size value is correct). I have been working on this for a long time. I have digged the Internet through google thoroughly and completely. And I can’t find any information about MS Word has reported the wrong Paper Size (and maybe orientation and duplex are both wrong). At least, whatever I use GetJob or DocumentProperties win32 api to get print job info, its Paper Size and Orientation and Duplex are all wrong.

If you have any suggestions or comments, I’d like to hear you very soon.

1 個回答

iT邦研究生 1 級 ‧ 2011-02-10 10:47:08

If you believed this problem coming from MS word, suggest you contact Microsoft or the better way to upgrade your office version to 2007 or 2010.

horngsh iT邦新手 4 級 ‧ 2011-02-11 11:14:20 檢舉

Thanks for your fast reply. I have contacted Microsoft Technical Support and tried to google for the MS Word Bug report web page. I have found the bug report web page url. It is not accessible now. I've found no way to do bug report about MS Word.