On Mon, 21 May 2018, Leonardo M. Ramé via fpc-pascal wrote:
On Mon, 21 May 2018, Leonardo M. Ramé via fpc-pascal wrote:
Hi, I need to print an TFPMemoryimage into Printer.Canvas (which uses
TCairoPSCanvas to printing to CUPS) from a Linux CGI (no widgetset), but
it seems that it's an impossible task, because Printer.Canvas requieres a
TBitmap which in turn requires a widgetset. Can anyone help me with
this?.
BTW, can fpReport print to a Printer? all the examples "exports" to PDF and
other formats, but none of them is sending directly the report to a printer.
If you use the LCL, it uses the printer canvas.
A FPImage PostScript canvas exists, but it's largely untested. In theory,
this could be used to create a postscript file and that could be sent
directly to cups.
Michael.
Hi Michael, do you mean TPostscriptCanvas from PSCanvas.pp?, that doesn't seem
to have a way to render a bitmap.
Yes, that is what I meant. It desperately awaits completion of course :(
I think I must send my bitmap to imagemagick's convert to create the Postscript
file, then use lpr to send it to the printer.
That will be the easiest for the time being...
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal