[Gambas-user] Trying how many pages before printing
Rolf-Werner Eilert
eilert-sprachen at ...221...
Thu Sep 25 09:05:22 CEST 2014
Hi folks,
The only thing that keeps me from actually converting all my Gambas2
stuff into Gambas3 is the printing function. There are situations when
you don't know how many pages you will end up with when starting to
print. For instance, there are tables or longer texts which might be
more than one page - or not.
So it's necessary to figure out how many pages to print prior to start
printing. In case of a simple line-by-line text or table, you can simply
compute the space needed in advance. But in some cases, I have much more
complex situations, and then it would be easiest to have a way to run a
simple pre-print and count the pages.
In those Gambas2 projects I mean, I have e. g. a printing function that
runs in a DO LOOP. When printing reaches the end of the page, it simply
opens a new page, jumps to the start position and continues printing there.
How do you solve this for Gambas3? I thought, a simple way would be to
order a single page, printing into a temporary pdf, and look if there is
another page needed, order another one-page print, and so on. Counting
each page, you produce only a one-page temporary pdf. Then you start the
actual printing with the counted number of pages.
Am I completely wrong here? Do you know a better/easier way?
Thank you for any input!
Rolf
More information about the User
mailing list