forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A problem with GetDeviceCaps and Xerox A3 printers

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Wed Jun 29, 2022 10:28 pm    Post subject: A problem with GetDeviceCaps and Xerox A3 printers Reply with quote

I hope that the following information is of use to someone.

I have an app written in 32-bit FTN95 and ClearWin+ that has run faultlessly in its once or possibly twice a year outing since 2005, when it was deployed for the first time. Its purpose is to print a topographic survey on A3 paper at a true scale, typically 1:500. In order to find the printable area of the paper, I have used GetDeviceCaps(iHDC, HORZSIZE) and GetDeviceCaps(iHDC, VERTSIZE) to get the size in mm in orthogonal directions. That approach has worked on a variety of printers including HP, Epson etc. This year, it failed when using Xerox Versalink C7000 series printers that respond with 208.0000 and 271.0000 regardless of the defaults set on the printer and/or selected in the printer driver or even whether portrait or landscape is selected.

As a shorthand, I will only mention the parameter to the GetDeviceCaps instead of quoting the whole shebang in what follows.

I suppose that the correct approach is to use the PHYSICALWIDTH and PHYSICALHEIGHT along with PHYSICALOFFSETX and PHYSICALOFFSETY which being in device units (pixels to you and me) also need LOGPIXELSX and LOGPIXELSY give a simple result in inches. OK, I do understand 25.4mm to the inch, but why is one PIXELS and the other ‘device units’ when they are the same? These parameters also assume that the PHYSICALOFFSETX and …Y are the same on both sides and top and bottom (respectively) to get the printable area, which seems to me from decades of using printers not necessarily the case.

OK, again I understand from MSDN that VERTSIZE and HORZSIZE relate to screens, but that is palpable nonsense because the actual screen size is a function of the monitor, and is only meaningful in terms of the ‘logical’ dpi and total pixels in each direction, in which case they are values in ‘logical’ mm, not real mm (and where the heck does the use of ‘logical’ come from, because it ain’t logical to me!)

The question for me is “Is it just Xerox that does things differently with respect to HP, Epson etc, or is this a trend in printer drivers?” along with “Is there any way to tell when HORZSIZE and VERTSIZE are lies?”

I have further experimentation to do, but needless to say, I am peeved that these new printers have ‘broken’ my app - their only purpose is to run it!

(When you get handed A4 sizes for A3 paper, then the scaling should be out by the expected factor, but even A4 isn't 208x271 !!!)

Eddie
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Wed Jul 06, 2022 11:10 am    Post subject: Reply with quote

It turns out that the IT section had 'updated' the drivers for those particular printers since they were last used before the Covid lockdown. The 'updated' drivers couldn't see the point of anything connected to metric.

Now which country in the whole of the world doesn't use mm ?

Answers below please.
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 697
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Wed Jul 06, 2022 4:19 pm    Post subject: Reply with quote

The one where cable impedances are expressed in ohms per 1000 feet (at 60 Hz)
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Wed Jul 06, 2022 10:15 pm    Post subject: Reply with quote

acre-feet for reservoir capacity? We Brits used to use those ...
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 697
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Thu Jul 07, 2022 2:34 pm    Post subject: Reply with quote

Flux lines per square inch is another one - rather more descriptive than the SI unit for magnetic flux density i.e. the Tesla.
Back to top
View user's profile Send private message Visit poster's website
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Thu Jul 07, 2022 4:47 pm    Post subject: Re: Reply with quote

"Flux lines per square inch" is a rather misleading term for magnetic flux density or any other flux density. In the continuum model of any phenomenon, there are no discrete tube-like lines, since we usually think of lines in space as having zero cross-sectional area.

If we were to coin a similar term for flowing water, we should be using, perhaps, "strands" (or "slugs per second") of water per acre - rather absurd today.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group