Menu

#10 Trouble with pdf_get_wrap_length()

open
nobody
None
5
2005-01-18
2005-01-18
Anonymous
No

I am trying to develop reports in which I combine normal
text with wrapped text in the same line - it works most
of the times. But if I don't control the size of the
wrapped text, I may get my line split into 2 different
pages. Solution: control the size of the wrapped text
prior to "printing" the line.

I've been trying to use pdf_get_wrap_length() to do
this, but I don't understand the output in the following
situation (I'm using font size 8, vertical space 12,
Courier). Take a string that is 36 chars long,
like "123456789 123456789 123456789 ABCDEF":

- Why do I get 24 from pdf_get_wrap_length
(stream,string,36)? This string doesn't need wrapping,
does it?

- Why do I get 8 from the same function when I remove
the last 6 characters, turning the string into 30 chars
long?

Have I understood the purpose of this (very useful)
function?

Thanks

Gustavo Neves (Portugal)
gustavoneves@matir.pt

Discussion


Log in to post a comment.

MongoDB Logo MongoDB