Text overlap

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Text overlap

Postby IDEAL Software Support » Tue Nov 23, 2004 3:18 pm

Hello,

I have a report using VPE 3.5 that has a few lines which are a bit
too long to print on one line of the document. The VPE will
automatically wrap the text to the next line, but I can't seem to
tell how to get the horizontal value of where the line stopped.

For Example, say I have the line
"This is a sample line of text which is too long to fit."

This line is too long to fit on one line of my document, so VPE will
print it as
"This is a sample line of text which is too long to
fit."

I need to continue printing where the VPE left off, on the same line,
but because I don't know where the previous line stopped at, I end up
printing over the "fit." part of the above. Is there a way to find
out where the VPE stopped printing horizontally on the page? I've
tried nRenderWidth but that doesn't seem to help. Any tips would be
appreciated, thanks!
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Tue Nov 23, 2004 3:19 pm

Since all objects in VPE are of rectangular shape, nRenderWidth (or simply nRight, which saves the call to a Render-Function) will return the maximum width of a text object. It is not possible to retrieve the right-most position of the text printed in the last line of a text object.

If you want to assemble text together, do this with the whole string and then output the complete string with a single Write() or Print() command.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 31 guests