[Lazarus] Printing in Linux

petr.kristan at epos.cz petr.kristan at epos.cz
Mon Feb 15 15:14:01 CET 2010


On Mon, Feb 15, 2010 at 11:13:12AM -0200, Felipe Monteiro de Carvalho wrote:
> On Mon, Feb 15, 2010 at 6:23 AM,  <petr.kristan at epos.cz> wrote:
> > Shouldn't be better to use for example Cairo than make poscript output
> > yourself?
> 
> The printing package is implemented by operating system rather then by
> widgetset, so if you use Cairo it would only work with LCL-Gtk2 and a
> new code would need to be written for LCL-Qt.
I maybe don`t understand your answer. In Windows is rendering for
printer implemented by operating system WinAPI. But in Unix we need to render
into postscript. Now it is realised by TPoscriptCanvas which do not use
any library, but output is erroneous.

As I know, Qt has its own rendering engine (screen and printer).
For example Kylix uses it.
And I now do not know if in LCL exists TQtCanvas used by LCL-Qt.

Cairo library is multiplatform and renders into X11, Win32, PS, PDF, ... 
It do not depends on gtk. 
Dependency is reversed -- new Gtk2 uses Cairo to render widgets.
For example WebKit and Firefox3 uses this library on all platforms.
http://en.wikipedia.org/wiki/Cairo_(graphics)

What about to make TCairoCanvas and use it by default in LCL-Gtk2.
IMHO generated postscript output should be better then TPoscriptCanvas
makes.

TCairoCanvas (certainly with corresponding library) can be useful in other platforms. 
Rendering into PDF, SVG or PNG may be convenience to anybody.

Petr

-- 
Petr Kristan
.
EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice
tel: +420 466335223    Czech Republic (Eastern Europe) 
fax: +420 466510709




More information about the Lazarus mailing list