I've adapted the printing code from Chapter 17. My text has multiple
pages with more than one font size. Each page is laid out by the
OnPreparePrinting() method. When I print,however, the number of lines
on a page is different because the horizontal and vertical extents of
line segments are not the same as for preview. I'm using
CalculateScale() unchanged from the Chapter 17 sample code, and it's
producing different scales (0.419 for preview, 0.75 for printing).
Still, the relationship between the scales isn't what's needed to make
the text on the printed page the same "size" as the text in the
preview.
just to clarify, do you mean chapter 17 from “wxPython in Action”?
Also, try and clarify what exactly it is with which you need help. Then the more knowledgeable members of this list will be able to help you.
···
–
Hi, I will kill all ads in google gmail.
They will all be dead and gone for all my emails to you. HA HA bye bye ads I just massacred you!!!
I've been using the printing.py sample code from Chapter 17 of
wxPython
in Action and found that the number of lines printed by the preview is
55,
and thenumber of lines printed on paper is 93. Perhaps I assumed
incorrectly,
but I thought that the CalculateScale() method would perform the
scaling necessary to make the printed page appear more or less like
the
preview. Is it possible to scale previewing and printing so that
they
appear the same? If so, is there sample code to demonstrate how to
do that?
···
On Nov 18, 9:07 am, Micah Nordland <mpnordl...@gmail.com> wrote:
just to clarify, do you mean chapter 17 from "wxPython in Action"?
Also, try and clarify what exactly it is with which you need help. Then the
more knowledgeable members of this list will be able to help you.--
Hi, I will kill all ads in google gmail.
They will all be dead and gone for all my emails to you. HA HA bye bye ads I
just massacred you!!!
I don’t know, all I ever used the print framework for is image printing, you should try to get the attention of Robin, he created wxPython, and coauthored wxPython in action.
He would be the one to help you.
···
–
Hi, I will kill all ads in google gmail.
They will all be dead and gone for all my emails to you. HA HA bye bye ads I just massacred you!!!
Yes, it should be possible, but I can't think of a better example to follow at the moment. You may want to expand your search to also look for wxWidgets C++ printing examples.
···
On 11/18/10 7:49 AM, zacktu wrote:
I've been using the printing.py sample code from Chapter 17 of
wxPython
in Action and found that the number of lines printed by the preview is
55,
and thenumber of lines printed on paper is 93. Perhaps I assumed
incorrectly,
but I thought that the CalculateScale() method would perform the
scaling necessary to make the printed page appear more or less like
the
preview. Is it possible to scale previewing and printing so that
they
appear the same? If so, is there sample code to demonstrate how to
do that?
--
Robin Dunn
Software Craftsman