A DESCRIPTION OF THE REQUEST :
CR80 (3 3/8" x 2 1/8") is the most common size for cards, when you try to use a card printer (tested with Datacard SP55 and Datacard SP35 printers) on Windows 2000/XP it's not posible to select the CR80 page size (although you can with Windows 98 SE).
Since you can not use javax.print.attribute.standard.MediaSize to create a custom MediaSize, CR80 should be a standard one included on the JDK.
Card printers are not-so-uncommon peripherals, and with the actual behavior are unusable with Java unless you do some custom developments on the printer side, with a custom PrintService or something simmilar.
In order to use cards printers from Java applications we need a CR80 MediaSize definition.
EXPECTED VERSUS ACTUAL BEHAVIOR :
To be able to select CR80 as MediaSize when using card (only) printers.
Since the card printers usually only accepts card specific MediaSizes (CR80, sometimes CR50 also) you can not select any MediaSize present on JDK, and it selects javax.print.attribute.standard.MediaSize.NA.LETTER as default, messing the printer output.
(Incident Review ID: 301631)
Posted Date : 2005-10-03 21:13:48.0
FULL PRODUCT VERSION :
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
4NT 6.01.233U Windows XP 5.1
A DESCRIPTION OF THE PROBLEM :
It is not possible to select a media size of US Standard Fanfold (14.875" x 11") in the printer setup dialogue because it is not defined in the javax.print.attribute.standard.Media* classes.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the sample below; pick a printer that should support US Std Fanfold paper. All other standard paper sizes are available except for that one.
Posted Date : 2005-10-03 21:13:49.0
We do query the driver for its custom sizes and report those back so this
should work already.
I installed the Datacard (www.datacard.com) Smart Driver for the SP55 on XP SP2
to help me understand the problem. It looks like this driver reports back
the correct size (540x857 mm) and name "CR80 2.13 x 3.38" but it reports
the windows paper ID as "9". This is the windows ID for A4 paper size.
So this looks to be a driver bug. It should be set to a custom ID.
So we get as far as creating the custom paper but then we notice
its supposed to be A4 and substitute that.
Also if we call OpenPrinter() and get a devmode, the driver sets
the DM_PAPERSIZE bit, and has set its value to "1" which is the windows ID
for LETTER. This looks like another driver bug.
I noticed that when installing the driver I was warned it hadn't passed
Window certification testing! Sounds about right.
We could add some extra checking for these cases, but I don't much
like the idea of the extra complexity for the benefit of a buggy driver.
Posted Date : 2007-06-18 22:39:03.0