EDN Admin
Well-known member
<span lang="EN-US Dear Sirs:
<span lang="EN-US
<span lang="EN-US I am an Engineer who works and lives in <span lang="EN-US Taiwan
<span lang="EN-US . 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%system32spoolPRINTERS 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:
<span lang="EN-US
<span lang="EN-US C0 ââ.F8 25 43
<span lang="EN-US 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.
<span lang="EN-US
<span lang="EN-US If you have any suggestions or comments, Iâd like to hear you very soon.
<span lang="EN-US
<span lang="EN-US Best regards,
<span lang="EN-US MCSE,
<span lang="EN-US Horngsh.
<span lang="EN-US
<span lang="EN-US PS. The following is my testing environment:
<span lang="EN-US
<span lang="EN-US
<p style=" <span lang="EN-US" style="font-family:Wingdings <span>l<span style="font:7pt "Times New Roman"
<span lang="EN-US Windows XP SP3 fully patched with MS Update
<p style=" <span lang="EN-US" style="font-family:Wingdings <span>l<span style="font:7pt "Times New Roman"
<span lang="EN-US MS Office XP fully patched with MS Update
<p style=" <span lang="EN-US" style="font-family:Wingdings <span>l<span style="font:7pt "Times New Roman"
<span lang="EN-US MS SQL Server 2005 Express fully patched with MS Update(now sp4?)
<p style=" <span lang="EN-US" style="font-family:Wingdings <span>l<span style="font:7pt "Times New Roman"
<span lang="EN-US Visual Studio 2005 Professional patched with SP 1
<p style=" <span lang="EN-US" style="font-family:Wingdings <span>l<span style="font:7pt "Times New Roman"
<span lang="EN-US HP Color LaserJet 5500 PCL 6
<p style=" <span lang="EN-US" style="font-family:Wingdings <span>l<span style="font:7pt "Times New Roman"
<span lang="EN-US My Project Type: Windows Form Application.
<span lang="EN-US <hr class="sig horngsh
View the full article
<span lang="EN-US
<span lang="EN-US I am an Engineer who works and lives in <span lang="EN-US Taiwan
<span lang="EN-US . 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%system32spoolPRINTERS 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:
<span lang="EN-US
<span lang="EN-US C0 ââ.F8 25 43
<span lang="EN-US 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.
<span lang="EN-US
<span lang="EN-US If you have any suggestions or comments, Iâd like to hear you very soon.
<span lang="EN-US
<span lang="EN-US Best regards,
<span lang="EN-US MCSE,
<span lang="EN-US Horngsh.
<span lang="EN-US
<span lang="EN-US PS. The following is my testing environment:
<span lang="EN-US
<span lang="EN-US
<p style=" <span lang="EN-US" style="font-family:Wingdings <span>l<span style="font:7pt "Times New Roman"
<span lang="EN-US Windows XP SP3 fully patched with MS Update
<p style=" <span lang="EN-US" style="font-family:Wingdings <span>l<span style="font:7pt "Times New Roman"
<span lang="EN-US MS Office XP fully patched with MS Update
<p style=" <span lang="EN-US" style="font-family:Wingdings <span>l<span style="font:7pt "Times New Roman"
<span lang="EN-US MS SQL Server 2005 Express fully patched with MS Update(now sp4?)
<p style=" <span lang="EN-US" style="font-family:Wingdings <span>l<span style="font:7pt "Times New Roman"
<span lang="EN-US Visual Studio 2005 Professional patched with SP 1
<p style=" <span lang="EN-US" style="font-family:Wingdings <span>l<span style="font:7pt "Times New Roman"
<span lang="EN-US HP Color LaserJet 5500 PCL 6
<p style=" <span lang="EN-US" style="font-family:Wingdings <span>l<span style="font:7pt "Times New Roman"
<span lang="EN-US My Project Type: Windows Form Application.
<span lang="EN-US <hr class="sig horngsh
View the full article