RenderWrite

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

RenderWrite

Postby nc1264 » Mon Mar 13, 2006 9:30 am

For a labeling program that we are using we need to scale fonts to the maximum size that we have available on a specific place on the paper.

This means that we may have a box from position 10,10,200,VFREE and the text that needs to be as llarge as possible so it will fit nicely in the box.

To determine which size will still fit the box I use the RenderBoxRTF. This should return the nRenderWidth and nRenderHeight.

This is where I get confused: is the nRenderHeight to value of the the VFREE? Is this the 'end of the box'.
Even when I do a WriteBoxRTF and check the returned nBottomY I get the same value. I'm sure that I'm missing the point here somewhere...


What I want to know is: what is the 'end coordinate' of the box. Once I have this I can use it to determine if the font can be scaled down (or up) until it fits nicely in the given space.

Your help is appreciated.
nc1264
 
Posts: 28
Joined: Mon Dec 13, 2004 8:18 am

Postby IDEAL Software Support » Mon Mar 13, 2006 5:05 pm

I don't understand your question.

With the Render-Methods you can compute the size of Text, Rich Text and Pictures depending on their content without inserting them into the document.

So RenderBoxRTF() should do the job for you.

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

Postby nc1264 » Tue Mar 14, 2006 7:47 am

Thorsten,
I made the mistake myself.

What I do is the following:
I replace all references to \fsxx with for instance \fs40. From this point I keep on rendering by dropping the \fsxx-2 until the text will fit in the box.
The mistake I made was that I was looking for \fsxx and replacing it with \FSxx-2. If was the capital \FS that created the chaos at my end.

Having solved this resolved the problem and the rendering works perfectly now!

Thanks.
nc1264
 
Posts: 28
Joined: Mon Dec 13, 2004 8:18 am


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 63 guests