473,895 Members | 2,086 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ghostscript interface

Does a ghostscript interface for python exist? I have searched google
quite a bit and all I have been able to find are command line hacks
from within python. Thanks in advance for any useful help.

Sep 10 '06 #1
2 3602
On Sun, 2006-09-10 at 08:14 -0700, defcon8 wrote:
Does a ghostscript interface for python exist? I have searched google
quite a bit and all I have been able to find are command line hacks
from within python. Thanks in advance for any useful help.
I'm not sure what you mean by a "Ghostscrip t interface". Ghostscript is
a program. Yes, you can run it from Python using the same methods you
run any other program from Python but I'd hardly call that an
"interface" .

If you're looking for a python postscript generator I believe a google
search will turn up a number of products.

If you're looking for a python .pdf generator you might want to check
out:
http://www.reportlab.org/

John Purser

Sep 10 '06 #2
defcon8 wrote:
Does a ghostscript interface for python exist? I have searched google
quite a bit and all I have been able to find are command line hacks
from within python. Thanks in advance for any useful help.
I'm not aware of a specific interface to the Ghostscript API, but it is
trivial to implement one with ctypes (included with 2.5).

--
-------------------------------------------------------------------------
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: an*****@bullsey e.apana.org.au (pref) | Snail: PO Box 370
an*****@pcug.or g.au (alt) | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia
Sep 10 '06 #3

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

Similar topics

3
2669
by: Chris Jankowski | last post by:
Hi all, I am still fairly new to the Python community and world of Python programming. I am having some trouble changing the output directory when I call Ghostscript. Any sugguestions would be greatly appreciated. It seems to work fine, if I put the file in a directory that I am calling it from, like outputdir = './temp' or I use the "C" drive w/ outputdir = ''. All I am doing is converting a .pdf to a .tif.
1
2357
by: Adam Twardoch | last post by:
I've written a simple commanline wrapper for calling GhostScript from Python. It uses os.system under Windows and os.popen under unixes. The call looks basically like this: gs -q -dNODISPLAY -dNOPAUSE -dSAFER ps2ai.ps infile.eps >outfile.ai I'd prefer to use the GhostScript DLL API* and call it using ctypes under Windows. This way, I could package just the DLL with my application and the user would not necessarily need to install the...
1
12476
by: tc | last post by:
Does GhostScript provide any library so that we can reference it in our C# project to programmatically handle printing of ps / pdf files? I have tried to use the gs command (call by process) in C# application to handle printing. gswin32 -dPrinted -dBATCH -dNOPAUSE -q -sDEVICE=ljet4 -dFirstPage=2 -dLastPa ge=2 -dORIENT1=false -sOutputFile="YourPrinterName" FileName However, I can't control the paper orientation of the printout (I have...
0
2405
by: Roel | last post by:
Hello I try to pint a pdf from a .net webapplication. Therefore I use GhostScript. When I execute the following line via "start - run", the pdf is printed correctly: c:\gs\gs8.14\bin\gswin32c.exe -dNOPAUSE -dBATCH -sDEVICE=ljet4 -sOutputFile= "%printer%\\SRV01\bezvntprt02\" c:\208.pdf My code in the appication:
1
2692
by: Christopher Campbell | last post by:
I am calling Ghostscript 8.00 from and ASP.NET application (VB) to create ..JPG thumbnails of .PDF files. I have created a class module for Ghostscript and I am creating an instance of the class to act on. I pass the class the name of the PDF file, the name of the JPG file that I want it to create, and a resolution factor to control resizing. This all works great. However, when Ghostscript finishes, it seems to maintain a lock on the...
2
1454
by: SpamProof | last post by:
I'm using the ps2pdf.bat file that ghostscript provides through my vb.net code to convert word documents to pdf. After each conversion, a winword process is left runnning in the task manager. Anybody knows how to prevent this from happening? Thanks in advance for your help
4
6640
by: Sjaakie | last post by:
Hello, Can someone tell me if it is possible to use Ghostscript from C#? I would like to create thumbnails from several PDFs. TIA
0
1653
by: Sjaakie | last post by:
Is there a Ghostscript ASP.NET wrapper available? Preferrably with an example... Thanks
18
33021
Ciary
by: Ciary | last post by:
hi all, it's my second question of today but since i'm stuck with this problem, i'm going to ask it anyway. i'm trying to convert an uploaded pdf file to a jpg, gif or png file. i want to use it as a background image. the problem isn't uploading the file, it's converting the file from pdf to an image. first, i tried to use imagick. so i installed ghostscript and imagemagick. but then the problems began. i searched 4 days to find a way to...
0
9990
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11249
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10845
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9649
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7177
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5863
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6068
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4689
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3294
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.