trichview.com

trichview.support




Re: Calculation of textheight


Return to index


Author

Message

Sergey Tkachenko

Posted: 03/21/2005 21:36:22


TRichView components use the following printing technique (with

TRVReportHelper component):

- documents can be separated on rectangular frames ("pages"); they must have

the same width, but may have different heights;

- it's assumed that all "pages" except for the last one have heights which

you specified when you created them; there is a method returning the real

height for the last "page" of the document.

- any page can be printed at the specified coordinates.

So the answer to your first question is yes.

The answer to your second question - only for the last document's page.

The answer to your third question - yes, but it's not always trivial,

because document can include not only characters, but more complex content

such as tables.

All coordinates are calculated in device pixels, but they can be easy

converted to mm and back, if you know the device resolution.


The answers above are for using TRichView without eDocEngine.

In the current implementation of eDocEngine/TRichView cooperation,

eDocEngine completely controls the process of printing (it makes all the

calculations using functions provided by TRichView). It was implemented by

eDocEngine developers, so, if you need to use our components together,

please address these questions to eDocEngine developers.


>

> We are currently using eDocEngine to print text, but we want to be able to

> print rich text also. We have been looking at your component but we need

> some more information.

> Our program uses a flow layout and needs to be able to do calculations on

> text before printing.

> This means that we should be able to:

>

> - Print text in a specified rectangle (top-left en bottom-right)

> Calculate the height of a text before printing if we are giving the left

> and right border of the text block

> - Determine the last character that will fit in a given rectangle

>

> Is this possible in combination with eDocEngine and can the coordinates be

> supplied in mm (as eDocEngine wants)?

>





Powered by ABC Amber Outlook Express Converter