Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-10

How do I approach printing?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tony Maro

I noticed there is not TPrinter object yet...

What's the best way for me to approach Linux CUPS printing? Or even just print to postscript file would make me happy.

-Tony

Reply by email

Andrew Johnson
I noticed there is not TPrinter object yet... What's the best way for me to approach Linux CUPS printing? Or even just print to postscript file would make me happy.

there is no way yet.. I have plans to make some, but they are long term because of the complexity involved. I would suggest looking to see if there are any Delphi/Kylix Postscript producers to port, otherwise...you'll probably have to write your own.

Basically if you are dealing with simple enough stuff.. aka lines rectangles and text. You can produce PDF's without much hastle, and then call to external programs to print it. The bulk of the problem is the Fonts and header info. but the actual calls are relatively simple. I would suggest taking a look at some Delphi wrappers for this sort of thing. There are a I saw. Try looking at TNPDF and vPDFCreator. These are mostly portable to Kylix, so they should probably be portable enough to Lazarus, that you could use them as a basic framework for simple printing. They are not very well thought out IMO, and are somewhat sloppy coding. but they still should be useable enough, if you are willing to sit down and study the code enough that you can see what it is they do. I may be able to write a simple PDFCanvas with support for basics myself, based on these two packages, but it may take awhile as I am rather busy at the moment.

Andrew

_________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com

Reply by email