[Lazarus] Printing in Linux
Jesus Reyes
jesusrmx at yahoo.com.mx
Mon Feb 15 21:03:26 CET 2010
> > > Shouldn't be better to use for example Cairo than
> make poscript output
> > > yourself?
It has pros and cons, on the nice side a very big amount of programming would be reused which means a better quality on output but it does impose a library dependency on application. I don't see that as a impossible obstacle though, on windows application deployment may include needed libraries (problems that comes with this approach are beyond of this topic) and on Linux needed libraries are usually already installed.
> >
> > 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.
It may be independent of GTK2.
>
> 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.
Printer support is already implemented for Qt, and if we want to support GTK native printer dialogs we need to implement a cairo canvas anyway.
>
> 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.
I been playing with this for long time, but every time there is something more to do, of course a patch would be welcome.
>
> 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
>
Jesus Reyes A.
Encuentra las mejores recetas en Yahoo! Cocina.
http://mx.mujer.yahoo.com/cocina/
More information about the Lazarus
mailing list