473,395 Members | 1,616 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

is this possible?

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

Jul 22 '05 #1
6 1110
On Friday 22 July 2005 08:26 am, scrimp wrote:
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.

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com

Jul 22 '05 #2
Yeah, Acrobat Reader is for viewing PDF's, not creating them.

See http://www.reportlab.org/ for a couple of mature PDF libraries.

Jul 22 '05 #3
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!

Jul 22 '05 #4
scrimp wrote:
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
rk***@ucsd.edu

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

Jul 22 '05 #5
On Fri, 22 Jul 2005 07:59:42 -0700, scrimp wrote:
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.

--
Steven.

Jul 23 '05 #6
On Saturday 23 July 2005 03:26 am, Steven D'Aprano wrote:
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).

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com

Jul 24 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Julia Briggs | last post by:
I am struggling to create a PHP function that would take a specified image (JPG, GIF or PNG) from a link, and resize it down to a thumbnail so it will always fit in a 200x250 space. I am hoping...
36
by: rbt | last post by:
Say I have a list that has 3 letters in it: I want to print all the possible 4 digit combinations of those 3 letters: 4^3 = 64 aaaa
20
by: CHIN | last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i cant find the solution !! ) I have to upload a file to an external site, so, i made a .vbs file , that logins to...
7
by: Andrzej | last post by:
Is it possible to call a function which name is given by a string? Let assume that I created a program which call some functions for example void f1(void), void f2(void), void f3(void). ...
2
by: Bhupesh Naik | last post by:
This is a query regarding my problem to make a spell and grammar check possible in text area of a web page. We have aspx pages which are used to construct letters. The browser based screens...
1
by: AAA | last post by:
hi, I'll explain fastly the program that i'm doing.. the computer asks me to enter the cardinal of a set X ( called "dimX" type integer)where X is a table of one dimension and then to fill it...
25
by: Piotr Nowak | last post by:
Hi, Say i have a server process which listens for some changes in database. When a change occurs i want to refresh my page in browser by notyfinig it. I do not want to refresh my page i.e....
4
by: RSH | last post by:
Okay my math skills aren't waht they used to be... With that being said what Im trying to do is create a matrix that given x number of columns, and y number of possible values i want to generate...
7
by: Robert S. | last post by:
Searching some time now for documents on this but still did not find anything about it: Is it possible to replace the entry screen of MS Office Access 2007 - that one presenting that default...
14
by: bjorklund.emil | last post by:
Hello pythonistas. I'm a newbie to pretty much both programming and Python. I have a task that involves writing a test script for every possible combination of preference settings for a software...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.