[Gambas-user] print resolution issues
Gian
bagoneo at ...69...
Fri Oct 10 11:04:03 CEST 2014
Hello Paul,
attached two small demonstrations that might inspire you.
gianluigi
> 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...
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QT_Graphics.tar.gz
Type: application/gzip
Size: 10750 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20141010/6e9fc1b1/attachment.gz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GTK_Graphics.tar.gz
Type: application/gzip
Size: 10174 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20141010/6e9fc1b1/attachment-0001.gz>
More information about the User
mailing list