PDFWriter and Page Breaks

  • Thread starter Michael Satterwhite
  • Start date
M

Michael Satterwhite

I'm sure this is something that someone here has done. More probably,
I'm missing the obvious.

In order to produce a report, I need to know when the text I'm printing
(or about to print - I'm not picky) is going to do a page overflow so
that I can put the neadings on the new page. I've been going through the
API, and I don't see how to check this.

Can anyone offer some insights into this?
 
D

Damjan Rems

Michael said:
I'm sure this is something that someone here has done. More probably,
I'm missing the obvious.

In order to produce a report, I need to know when the text I'm printing
(or about to print - I'm not picky) is going to do a page overflow so
that I can put the neadings on the new page. I've been going through the
API, and I don't see how to check this.

Can anyone offer some insights into this?

It doesn't. You have to do it by yourself. If it is out of page borders
it will be printed out of borders.

by
TheR
 
M

Michael Satterwhite

It doesn't. You have to do it by yourself. If it is out of page borders
it will be printed out of borders.

That smart text insertion wraps both lines and pages is documented.
Unless the documentation is wrong, it won't be out of borders when using
the text method. The question is how to measure the height of the next
item to print so that I can do a "manual" new page and insert headings.

Even if smart text insertion didn't auto-wrap and "You have to do it by
yourself", the question remains the same. "How do I measure the vertical
height of the text I'm about to add to the document?"
 
G

Gregory Brown


A good idea generally, but keep in mind that the OP will need to do
manual calculations whether he uses PDF::Writer or Prawn. They just
might be slightly more pleasant to do in Prawn. We do have very rough
header support, but anything interesting needs to be done manually
(for now). Hopefully we'll improve in that area soon.

-greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top