Questions tagged [ghostscript]

Ghostscript is a suite of software based on an interpreter for Adobe Systems' PostScript and Portable Document Format (PDF) page description languages.

Ghostscript is software which converts and processes different graphic formats:

  • Inputs: it can read in Portable Document Format (PDF), PostScript (PS) and Encapsulated PostScript (EPS)
  • Outputs: it can output PDF, PS, EPS and many graphic and raster image formats such as TIFF, JPEG, PNG, PNM, PPM, PCL.

Ghostscript's executables are frequently named...

  • ...gs (on Linux, Unix and Mac), and gswin32c.exe or gswin64c.exe for commandline-only interface,
  • ...gsx (on Linux, Unix and Mac), and gswin32.exe or gswin64.exe for the interface that also pops up a window with the rendered file.

The GhostPDL "extension" to Ghostscript can additionally process the Extensible Paper Specification (XPS), and Hewlett Packard's PCL and convert these to most of the above mentioned output formats.

The commandline tools of the GhostPDL extension are named...

  • ...pcl6 for PCL input,
  • ...gxps for XPS input,

Ghostscript can also be described as a PostScript interpreter and as a PDF interpreter as well as a PDF distiller. As such it aims to be as compatible as possible with Adobe Systems' PostScript interpreter and Acrobat Distiller products. That means you can ask Ghostscript to process (most of) the same setdistillerparams as are documented by Adobe.

2294 questions
10
votes
4 answers

Is it possible in Ghostscript to add watermark to every page in PDF

I convert PDF -> many JPEG and many JPEG -> many PDF using ghostscript. I need to add watermark text on every converted JPEG (PDF) page. Is it possible using only Ghostscript and PostScript? The only way I found: gswin32c -q -sDEVICE=pdfwrite…
radistao
  • 14,889
  • 11
  • 66
  • 92
9
votes
2 answers

Keep getting error messages in ghostscript when using the documented ghostscript syntax

I am new to ghostscript and I cannot figure out the syntax. Whenever I try the simplest of commands ex -h or -? I get an error and I have tried them in all sorts of combinations. GPL Ghostscript 9.05 (2012-02-08) Copyright (C) 2010 Artifex…
DaNet
  • 398
  • 3
  • 6
  • 20
9
votes
3 answers

Converting searchable PDF to a non-searchable PDF

I have a PDF which is searchable and I need to convert it into a non-searchable one. I tried using Ghostscript and change it to JPEG and then back to PDF which does the trick but the file size is way too large and not acceptable. I tried using…
Steven Yong
  • 5,163
  • 6
  • 35
  • 56
9
votes
1 answer

What dimensions do the coordinates in PDF cropbox refer to?

If one has, for example, a pdf with the wrong page size specified one can crop away the unwanted portions of the document with ghostscript and the command parameter /CropBox. My question is, what do the numbers in the command refer to? I know they…
matt wilkie
  • 17,268
  • 24
  • 80
  • 115
9
votes
1 answer

Fix for unreadable ghostscript font

I'm using the ruby Scruffy gem to create some graphs. It relies on RMagick to render the text and create the pngs. When I run my ruby script I get this error. sh: gs: command not found sh: gs: command not…
Nate Bird
  • 5,243
  • 2
  • 27
  • 37
9
votes
2 answers

combining pdf files with ghostscript, how to include original file names?

I have about 250 single-page pdf files that have names like: file_1_100.pdf, file_1_200.pdf, file_1_300.pdf, file_2_100.pdf, file_2_200.pdf, file_2_300.pdf, file_3_100.pdf, file_3_200.pdf, file_3_300.pdf ...etc I am using the following…
Stephen
  • 91
  • 1
  • 1
  • 2
9
votes
5 answers

ImageMagick or GhostScript: convert a multi-page TIFF to a multi-page PDF

I need to convert a multi-page TIFF to a multi-page PDF. I have access to ImageMagick and GhostScript (in *nix environment). How do I do this? Thanks. UPDATE: It turns out that my test file was wrong (it didn't have multiple pages), which made me…
StackOverflowNewbie
  • 39,403
  • 111
  • 277
  • 441
9
votes
2 answers

stamp a pdf with an image

I am currently writing an application in which wone of the processes is to stamp an existing 1-page pdf-document with an image provided by the user. The stamp needs to be scaled and position correctly onto the pdf. I've successfully followed the…
Runar
  • 245
  • 3
  • 17
9
votes
4 answers

Merging two a5 pages into a singe a4 page (without using pdfnup)

I am using Dompdf to generate A5 pdf documents from a html template and Pdfnup (Part of Pdfjam) to combine them into a nice single A4 sheet, which helps saving some paper when printing :) # Generate an a5 pdf php dompdf.php mytemplate.html -p 'A5'…
Andrea Fiore
  • 1,628
  • 2
  • 14
  • 18
9
votes
2 answers

How can I use Ghostscript to convert XPS to PDF or XPS to DOC?

Which one is the best third party libary to convert XPS to PDF and XPS to DOC.
Dhyanesh
  • 247
  • 1
  • 4
  • 12
9
votes
3 answers

What are best parameters to run ImageMagick to convert low quality pdf to images (for OCR)

I have several low quality pdfs. I would like to use OCR -- to be more precise Ocropus to get text from them. To do use, I use first ImageMagick -- a command line tool to convert pdf to images -- to transforms these pdfs into jpg or png. However…
Skarab
  • 6,981
  • 13
  • 48
  • 86
9
votes
8 answers

Can't add new Redirected Port in Windows 7 after installing RedMon

My operating system is Windows 7 32bit. I installed RedMon1.7, Ghostscript 8.71 and GSview 4.9; installations were successful. I went to Add New Local Printer in Windows Devices and Printers, clicked on Create A New Port, and selected Redirected…
Zerone
  • 566
  • 4
  • 10
  • 24
9
votes
2 answers

Ghostscript suppress output windows when called by command line

This is my scenario: I'm converting PDF files to PNG images calling Ghostscript by C#. This is the argument string I use: -dNOPAUSE -dBATCH -dFirstPage=1 -q -r300 -sDEVICE=png256 -sOutputFile=... But, in this way, when I call Ghostscript it shows…
SamDroid
  • 601
  • 1
  • 10
  • 28
9
votes
1 answer

Does Commercial use of GhostScript as Saas needs a licence ?

I was working on a project. In which a user can upload PDF and convert it into images and So that i have used GhostScript dll (gsdll32.dll). Now in my application i want to charge from users as monthly subscription so that i can provide them more…
objectWithoutClass
  • 1,631
  • 3
  • 14
  • 15
9
votes
1 answer

Printing Umlauts in Matlab

I’m am trying to create a pdf file from matlab figure using cmyk colors, but facing a problem with umlauts and also some other special characters. Is there any other way to handle this than Latex? The following example demonstrates the…
Pekka
  • 91
  • 2