Hi,
I'm using the following C++ code to set page size:
LPDEVMODE dm=...
dm->dmFields=DM_PAPERSIZE|DM_PAPERLENGTH|DM_PAPERWIDTH;
dm->dmPaperSize=0;
dm->dmPaperLength=length;
dm->dmPaperWidth=width;
ResetDC(hdc,dm);
Under WinXP all works fine, however I found that under Win7 the maximal length or width value which can be entered is 29690 (i.e. 296,9 cm). If any value is higher, then ResetDC returns NULL and the given hdc is no more usable for printing. Do you know something about this issue and is it Win7 related or is it some problem in XChange?
Strange page sizing under Win7
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
-
- Site Admin
- Posts: 17949
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: Strange page sizing under Win7
Hi Anovy,
The limits should be 50800 - 508cm or 200 inches as detailed in the PDF specification - will ask the guys to have a look at this.
Best,
Stefan
The limits should be 50800 - 508cm or 200 inches as detailed in the PDF specification - will ask the guys to have a look at this.
Best,
Stefan
-
- User
- Posts: 164
- Joined: Mon Feb 08, 2010 8:48 am
Re: Strange page sizing under Win7
Yes, I know this limit and under WinXP it works, but under Win7 I'm unable to achieve it. Or is there any other method how to set cutom page size in XChange?
BTW: The DeviceCapabilities(DC_MAXEXTENT) function returns for XChange these limits: 32767, 32767, i.e. 327,67 cm only. Not important for me, but generally you should return correct values.
BTW: The DeviceCapabilities(DC_MAXEXTENT) function returns for XChange these limits: 32767, 32767, i.e. 327,67 cm only. Not important for me, but generally you should return correct values.
-
- Site Admin
- Posts: 3550
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
Re: Strange page sizing under Win7
By specification, driver fills max extend in DrvDeviceCapabilities function. It fills it in POINTS structure which has x, y as SHORT with range -32768 to 32767.BTW: The DeviceCapabilities(DC_MAXEXTENT) function returns for XChange these limits: 32767, 32767, i.e. 327,67 cm only. Not important for me, but generally you should return correct values.
It is Windows 7 related (similar problem will be when large page size used together with high DPI).If any value is higher, then ResetDC returns NULL and the given hdc is no more usable for printing. Do you know something about this issue and is it Win7 related or is it some problem in XChange?
Tracker Software (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- User
- Posts: 164
- Joined: Mon Feb 08, 2010 8:48 am
Re: Strange page sizing under Win7
The dmPaperLength and dmPaperWidth in DEVMODE are also defined as SHORT, but in fact they are treated as WORD (at least in WinXP). Otherwise large paper sizes cannot be achieved (for example the max PDF size 200 inches).By specification, driver fills max extend in DrvDeviceCapabilities function. It fills it in POINTS structure which has x, y as SHORT with range -32768 to 32767.
If so then this is horrible backward step in Win7. I cannot believe that modern OS in 21th century does not allow printing on a paper with a dimension larger than 3 m. Moreover the found limit is 29690 (not 32767), which sounds even more bizarre. Do you have some connection to Microsoft to ask them for this?It is Windows 7 related (similar problem will be when large page size used together with high DPI).
-
- User
- Posts: 164
- Joined: Mon Feb 08, 2010 8:48 am
Re: Strange page sizing under Win7
I also realized that the limit can depend on DPI (as you wrote). I used 1016 DPI, for the found limit 296,9 cm this implies 118760 points exactly (1016*296,9/2,54). I can look to this number as to the real limit, so if I will lower DPI, I can increase length. In either case 118760 points looks also as some foolish constant, I don't understand such limit.
-
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
Re: Strange page sizing under Win7
The issue appears to be with Windows 7 and we are in touch with Microsoft directly - we are now dependant on them - so please be patient and we will advise you of progress as it occurs, but I stress - we are reliant on them.
Thanks
Thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com
-
- Site Admin
- Posts: 6901
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
Re: Strange page sizing under Win7
We are still waiting to hear from Microsoft. We have attempted to get an update but still have nothing from them. We will continue to push for a response. Our internal Ticket for this item is RT#586: problem printing to large paper size on Win7
Your patience is still appreciated.
Your patience is still appreciated.
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
-
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
Re: Strange page sizing under Win7
Pls note that we have now sent MS 4 emails and called on 4 occassions and have received read receipts for emails - buit still no worthtwhile response ...
Please feel fee to also contact them using the ticket info you supplied and we also were advised to use (by MS) - maybe 2 direct contacts chasing will prove more successful.
Thanks
Please feel fee to also contact them using the ticket info you supplied and we also were advised to use (by MS) - maybe 2 direct contacts chasing will prove more successful.
Thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com
-
- Site Admin
- Posts: 6901
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
Re: Strange page sizing under Win7
Eventually, despite no response from Microsoft, we (thanks here goes to Roman actually...) found this: http://support.microsoft.com/kb/2011767 so there is now a KB article about it on our site: https://www.pdf-xchange.com/knowled ... -Windows-7
The latter is essentially just a reference to the former. It has worked for others, if anyone has problems implementing this fix to Windows 7 please do let us know.
Case closed...
The latter is essentially just a reference to the former. It has worked for others, if anyone has problems implementing this fix to Windows 7 please do let us know.
Case closed...
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com