Printing options

James Richard Tyrer tyrerj at acm.org
Wed Oct 22 20:20:09 CEST 2003


Goffioul Michael wrote:
> OK, let me make this a little more clear about how it works.
> QPrinter/KPrinter constructor has an argument that tells the
> PS generator what resolution to use:
> - PrinterResolution: 75 dpi
> - ScreenResolution: the actual screen resolution
> - HighResolution: 600 dpi
> Those values are fixed and the actual printer resolution as
> determined in the PPD file is not considered. Most apps uses
> the second option because it's the easiest to produce WYSIWYG
> print result (konqueror uses 75 dpi, kword uses 600 dpi).
> 
> In KPrinter, I extended this behavior by adding the possibility
> to tell the KPrinter object to use the resolution as extracted
> from the PPD file. If, for any reason, it cannot get the
> resolution value, it uses one of the 3 values above as fallback
> (the one used in the KPrinter constructor).
> 
> Now, the resolution extraction mechanism is based on the PPD
> keywords "Resolution" and "DefaultResolution". If an option
> "Resolution" exist in the PPD file, KPrinter uses the value
> as selected by the user in the printer properties dialog. If
> the option doesn't exist, it looks for "DefaultResolution"
> which should be present (at least this is the case for all
> Foomatic PPD files). Moreover, the resolution value must
> follow the syntax "100dpi" or "100x100dpi" to be recognized
> (again, as specified by Adobe).
> 
> But, let me state this again: in Qt, the application decides
> the PS resolution, using fixed values. KPrinter extends this
> by providing access to the actual printer resolution, if
> possible. But the application is still responsible of using
> this. You may force the resolution to be always the printer
> resolution, but I'm afraid many apps are not prepared to
> this. You can make the test by simply adding the line:
> 
> printer.setUsePrinterResolution(true);
> 
> just after the printer object creation in the application code.
> And try to print to a printer that has a Adobe-compliant PPD
> file.
> 

I tried this with OpenOffice Writer and it does the same thing.  It 
embedded the existing image -- didn't change its size (in pixels) -- along 
with instructions as to its size and scaling.  This leaves the printer to 
interpolate the image.  The only additional thing which the OO PS driver 
did was insert a line specifying the hardware resolution of the printer and 
it specified the scaling rather than the resolution of the image, but the 
result is the same, the printer is left to do the interpolation.

So, I don't think that this is an urgent issue, and it would require Troll 
Tech to change the Qt PostScript driver to fix it.

--
JRT



More information about the kde-print mailing list