[Lazarus] PDF generator, try 2

Ondrej Pokorny lazarus at kluug.net
Thu Mar 31 22:44:18 CEST 2016

On 31.03.2016 20:39, Michael Van Canneyt wrote:
> On Thu, 31 Mar 2016, Ondrej Pokorny wrote:
>> A quick question (sorry I haven't tested): is word breaking supported 
>> and is it possible to get the target rect of multiline and singleline 
>> text?
> It is possible to get a target rect of a single line; unit fpttf:
> function TextWidth(AStr: string; APointSize: single): single;
> Word breaking is left to the calling application.
> A reporting tool is in the make (well, made, but not released yet)
> which will handle this.

Great, thank you!

And is it possible the other way round? I.e. I know the target rect and 
I have to export a single line exactly into that rect? (The text has to 
be scaled to fill the rect.)

Why I ask: I need to print my PDFs directly from a Lazarus application. 
I have to render the page on a canvas (monitor for preview, printer for 
printing) and create a PDF from the same source. All three targets 
(monitor, printer, PDF) have to be exactly equal.
I achieved this in Delphi with Synopse PDF. Now I'd like to port my 
reporting solution to Lazarus.


More information about the Lazarus mailing list