From: <doc...@us...> - 2007-08-17 19:20:07
|
Revision: 148 http://openpcl.svn.sourceforge.net/openpcl/?rev=148&view=rev Author: documentsystems Date: 2007-08-17 12:19:59 -0700 (Fri, 17 Aug 2007) Log Message: ----------- Howard Hoagland. Keep the PCL drawiing coordinates at 300DPI but tell the printer driver to go into 600DPI mode, then scale the image for a print driver setting of 600 dpi because there are some new printers (HP LaserJet 9000, Samsung ML2510, newer Xerox printers) that don't do 300 DPI. Most printers now a days have 600 DPI. This fixes the problem where the page image prints at 1/2 the size width and height taking up 1/4th the printed paper when the image is supposed to take up the whole paper page. This was happening for printers that don't have 300 DPI. But now if you pick a printer that has 300dpi but not 600dpi then the page image will print too big (like the HP LaserJet III from 1991 if anybody still uses a 16 year old printer). For those printers that don't have 600dpi, a fix still needs to be done to detect the dpi that the printer driver picked at run time. I opened 11082648 help ticket with Sun and Jose.Paul to try to find a way to get the print driver selected printer dpi at run time in code, because currently, the PrinterJob class doesn't have a getter for the print driver selected dpi. Modified Paths: -------------- openpcl/src/com/openpcl/viewer/OpenPCLViewer.java Modified: openpcl/src/com/openpcl/viewer/OpenPCLViewer.java =================================================================== --- openpcl/src/com/openpcl/viewer/OpenPCLViewer.java 2007-08-17 19:11:04 UTC (rev 147) +++ openpcl/src/com/openpcl/viewer/OpenPCLViewer.java 2007-08-17 19:19:59 UTC (rev 148) @@ -678,7 +678,7 @@ mPrintRequestAttributeSet.add(MediaSize.findMedia(8.5f, 14.0f, Size2DSyntax.INCH)); mPrintRequestAttributeSet.add(Sides.ONE_SIDED); mPrintRequestAttributeSet.add(Chromaticity.MONOCHROME); - mPrintRequestAttributeSet.add(new PrinterResolution(300, 300, ResolutionSyntax.DPI)); + mPrintRequestAttributeSet.add(new PrinterResolution(600, 600, ResolutionSyntax.DPI)); mPrintRequestAttributeSet.add(new JobKOctets((int)(1.3 * 1024))); // each page is 1.3 MB mPrintRequestAttributeSet.add(new JobName(getAppName() + " print", Locale.getDefault())); mPrintRequestAttributeSet.add(new MediaPrintableArea(0.18f, 0.18f, 8.14f, 13.64f, MediaPrintableArea.INCH)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |