[Gambas-user] print resolution issues

Benoît Minisini gambas at ...1...
Thu Oct 9 23:37:42 CEST 2014


Le 08/10/2014 18:20, Paul Horechuk a écrit :
> I have a successful project that formats a sheet of labels on an Avery
> form and prints directly to an HP OfficeJet 7500 E910.
>
> I set the printer width to 850 and length to 1100 with a resolution of
> 100. These may not be correct for all (PrinterWidth and length are seen
> as 216 by 279mm), but by setting moveto coordinates within this range, I
> do get a correct sheet of labels.
>
> Problems:
>
> On a customer printer with the same version of gambas 3.5.4, the
> coordinates are stretched so that the labels are stretched by about 50%.
> This is on a Canon Pixma.
>
> Further checking shows a print to file (as PDF) from the printer dialog,
> resulting in:
>
>    *    vertical resolution is about 1/4 of what it should be
>    *    fonts are correctly sized
>    *    horizontal positioning is about 1/4 as well
>    *    therefore all text is compressed into the upper left
>    *    a QR code is about 1/4 the expected size
>
>
> Changing the resolution for a direct print to Pixma has no effect.
> Changing from 100 to 75 or to 150, results in the same stretched
> printout. This works as expected on the HP.
>
> Suggestions?
>

The first thing I can quicky tell you: you must not use the printer 
resolution when drawing on a printer.

If you use it, then something is doomed in your drawing routine, unless 
you want to draw at the pixel level, for example the thinest possible 
line (one pixel). Then you need the printer resolution, but this is the 
only case.

Otherwise, in all normal printing routines, printer resolution is not 
needed.

But maybe I didn't understand what you wrote...

-- 
Benoît Minisini




More information about the User mailing list