is this possible?

S

scrimp

Is it possible to print a PDF file using python without having acrobat
reader installed on the machine??
 
T

Terry Hancock

Is it possible to print a PDF file using python without having acrobat
reader installed on the machine??

Sure, there are several free-licensed PDF readers. Perhaps the
most obvious is Ghostscript ("gs") which can interpret PDF as
well as Postscript. On a Linux system, you probably already
have this installed. On other platforms, you may have to provide
it.
 
S

scrimp

I am using reportlab not to generate PDF files, but I want to be able
to print them without having to install acrobat reader. I looked
through the users guide and found nothing about printing to a printer
(programmatically). I want to be able to automate the printing of
reports when they are available. Does anyone know how this is done
using reportlab? thanks!
 
R

Robert Kern

scrimp said:
I am using reportlab not to generate PDF files, but I want to be able
to print them without having to install acrobat reader. I looked
through the users guide and found nothing about printing to a printer
(programmatically). I want to be able to automate the printing of
reports when they are available. Does anyone know how this is done
using reportlab? thanks!

It isn't done using ReportLab. Follow Terry Hancock's advice.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
S

Steven D'Aprano

I am using reportlab not to generate PDF files,

Isn't that amazing! I'm also using reportlab not to generate PDF files
too! I installed the program, and it just sits there, not generating as
many PDF files as I don't want for as long as I don't want them.

:)
but I want to be able
to print them without having to install acrobat reader. I looked
through the users guide and found nothing about printing to a printer
(programmatically). I want to be able to automate the printing of
reports when they are available. Does anyone know how this is done
using reportlab? thanks!

As others have suggested, if you have to deal with PDF files without
Acrobat, you could use ghostscript. Also pre-installed on many versions
of Linux, and probably other Unixes as well, is pdf2ps which will convert
the PDF file to a pure postscript file, which you can then print to any
printer which understands postscript.

If you are using Windows, you can possibly find open source or free
software to do these things. Google is your friend: www.google.com
But the chances are you'll have to install *something* -- compared to even
the most impoverished Linux distro, Windows is very much "batteries not
included", and while Python does come with many batteries, a full-blown
postscript interpreter is not one of them.
 
T

Terry Hancock

On Fri, 22 Jul 2005 07:59:42 -0700, scrimp wrote:
As others have suggested, if you have to deal with PDF files without
Acrobat, you could use ghostscript. Also pre-installed on many versions
of Linux, and probably other Unixes as well, is pdf2ps which will convert
the PDF file to a pure postscript file, which you can then print to any
printer which understands postscript.

IIRC, "pdf2ps" is a utility that comes with Ghostscript, and actually
does use it to do the transformation (that is, I think it's just a script
to run ghostscript with the appropriate options).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,310
Members
47,977
Latest member
MillaDowdy

Latest Threads

Top