postscript

Fit to page size in ghostscript (with a possibly corrupt input)

依然范特西╮ 提交于 2019-11-30 20:27:43
I'm trying to use ghostscript to convert a .ps file to a series of .png files, largely because I don't have a tolerable ps viewer. This is the command I've used: gs -dBATCH -dEPSCrop -dEPSFitPage -sDEVICE=png16m -r300 -dNOPAUSE -sOutputFile=neptune_111115_ob1-2_13pca_boloplots_%d.png neptune_111115_ob1-2_13pca_boloplots.ps (the .ps file is a multi-page postscript). The outputs are partly off the page. I'd like the images to fit inside the page. I can include example files, but they're pretty large - is there any particular part of the .ps file that would be helpful? My suspicion is that the

Simple way to add an image in postscript

纵饮孤独 提交于 2019-11-30 19:50:49
I am trying to write a document in postscript. Thus far I've been able to write simple text, and work with lines and shapes. I'm now trying to add some images to the document. After searching on-line I can't seem to find any clear way to do this. the snip it below is a hello world: %!PS /Times 20 selectfont 20 800 moveto (Hello World!) show showpage All I want to do is simply insert an image (eg PNG, JPG, GIF) by specifying the x and y, co-ordinates. Any help would be much appreciated. There is a simple method and Postscript does support the jpeg format. If you are using ghostscript you may

Python tkinter save canvas as postscript and add to pdf

老子叫甜甜 提交于 2019-11-30 17:57:57
问题 I have a simple python tkinter paint program (user use mouse to draw on the canvas). My objective is to save the final drawing and put it into a pdf file with other contents. After looking around, i realized that i can only save the canvas drawing as postscript file like this canvas.postscript(file="file_name.ps", colormode='color') So, i am wondering if there's any way (any python module?) that will allow me to insert the postscript files into pdf file as images. Is it possible? 回答1: As it

can I use Ghostscript to overlay a text (fax) header onto a PDF and/or TIFF?

梦想的初衷 提交于 2019-11-30 16:03:51
I'm writing an application that faxes a document (many supported types) provided by the end user. A requirement is that the end user can also provide text to be used as part of a custom fax header. I've been using Ghostscript to render PDFs as TIFFs and it's been working great so far, but I have yet to find a straightforward way of overlaying the custom header at the top of a PDF. I've tried out a few recommendations: How can I make a program overlay text on a postscript file? How can I add a footer to the bottom of each page of a postscript or pdf file in linux? Add comments to PDF files

Overlay two postscript files (command line approach)?

本秂侑毒 提交于 2019-11-30 09:52:29
I'm aware that similar questions have been answered here before: postscript - overlay one pdf or ps file on top of another - Stack Overflow overlay - Overlaying or merging multiple .ps files - Stack Overflow ... however, as they don't directly answer my specific problem, I'll try asking again. I would like to know, how I can overlay two postscript files: one - a logo: logo.ps ... on top of the other - a graphic background: tmp-Front.ps .... using a command line approach in Linux. It is of importance here, that the graphic background preserves its original contents to the greatest extent

How to change page orientation of PDF? (Ghostscript or PostScript solution needed)

我们两清 提交于 2019-11-30 08:08:52
Given a PDF document, how do I change individual page orientation? I'm using latest version of Ghostscript. Why do you require usage of Ghostscript? Would it be acceptable to use another Free, Open Source Software tool running on the commandline, such as pdftk ? Anyway, here is how to rotate pages with Ghostscript. However, this may not work for your intentions, because you cannot force a certain orientation for an individual page only. It relies on an internal Ghostscript algorithm that tries to rotate pages automatically, depending on the flow of text inside the PDFs: * -dAutoRotatePages=

How to add page numbers to Postscript/PDF

随声附和 提交于 2019-11-30 06:14:43
问题 If you've got a large document (500 pages+) in Postscript and want to add page numbers, does anyone know how to do this? 回答1: This might be a solution: convert postscript to pdf using ps2pdf create a LaTeX file and insert the pages using the pdfpages package ( \includepdf ) use pagecommand={\thispagestyle{plain}} or something from the fancyhdr package in the arguments of \includepdf if postscript output is required, convert the pdflatex output back to postscript via pdf2ps 回答2: Based on rcs's

Convert: Postscript delegate failed

不想你离开。 提交于 2019-11-30 05:42:56
I am trying to convert a PDF to JPEG: $ convert pdf-test.pdf pdf-test.pdf.jpg However, I am getting this error: convert: Postscript delegate failed `pdf-test.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/664. convert: missing an image filename `pdf-test.pdf.jpg' @ error/convert.c/ConvertImageCommand/3015. Currently I am using this version of GS and ImageMagick on Mac OS X Lion: $ gs -v GPL Ghostscript 9.02 (2011-03-30) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. $ convert -version Version: ImageMagick 6.7.1-1 2011-07-21 Q16 http://www.imagemagick.org Copyright:

How to adjust BoundingBox of an EPS file?

假装没事ソ 提交于 2019-11-30 05:37:59
问题 I want to crop main area of a PS or PDF file to create an EPS file without white space. Commands of ghostrcipt , ps2pdf , epstools can crop the main drawing out of the document file. The problem is that they only crop in its original form, but I want to create an EPS file with BoundingBox 0 0 x y ; cropped and moved to the bottom left corner. The difference i when we want to insert the resulting EPS file inside a PS document. When having BoundingBox x0 y0 x y , the PS document inserts the EPS

Simple way to add an image in postscript

会有一股神秘感。 提交于 2019-11-30 04:37:42
问题 I am trying to write a document in postscript. Thus far I've been able to write simple text, and work with lines and shapes. I'm now trying to add some images to the document. After searching on-line I can't seem to find any clear way to do this. the snip it below is a hello world: %!PS /Times 20 selectfont 20 800 moveto (Hello World!) show showpage All I want to do is simply insert an image (eg PNG, JPG, GIF) by specifying the x and y, co-ordinates. Any help would be much appreciated. 回答1: