I should also let you know of something else I found out only recently about turbopoweripro - there are printing methods that are not exposed by default. They were quite clearly always there in the examples folder provided with lazarus svn and I should have looked before!

Go to Project > Project Options and click on Additions & Overrides. Add a Custom Option and enter "-dHtml_Print" (without quotes).

The example project shows to add these lines to your code:

under unit name -

{$define UsePreview}

in uses section -

{$ifdef UsePreview}
OsPrinters,
{$endif}

You now have access to new methods on the htmlpanel, e.g.

.PrintPreview;
.GetPrintPageCount;
.Print(1, PageCnt);

I have been playing with these but have discovered a known bug. When printing a file that spans multiple pages, the last line of any page is repeated as the first line of the next page.

If I find a workaround (or maybe even fix the source code - HA!), I will let you know.

Rgds,

Martin Collins


On 09/05/15 10:47, Giuliano Colla wrote:
Il 09/05/2015 00:02, Giuliano Colla ha scritto:
Is it a known issue or I'm doing something wrong?

By browsing the list I discovered it's a known issue:

http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Help-turbopower-ipro-anchors-td4041182.html#none

Giuliano



--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to