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. Its main purposes are the rasterization or rendering of such page description language files, for the display or printing of document pages, and the conversion between PostScript and PDF files.

Filter by
Sorted by
Tagged with
0 votes
2 answers
42 views

Where are gs-X11 and gs-noX11 on my Mac?

I performed the following steps: Reinstalled macOS Ventura 13.4 on my system. (I was taken aback to not find /usr/local/bin/, but then this answer provided relief.) Installed Homebrew. (It is in /opt ...
Atom's user avatar
  • 101
0 votes
0 answers
24 views

linux add bleed to pdf that is the average colour of the page

because of inexperience with professional printing, we did not take bleed margin into account when creating a small magazine. A lot of pages have text cut off because of this. We can reprint them, but ...
dex's user avatar
  • 1
0 votes
0 answers
35 views

Ghostview with special character passwords

I have a PDF that I'd like to archive password-less. I don't have the master password, but I do have the viewing password. In the past, I've used ghostview to do this. In this case, though, the ...
coopermj's user avatar
  • 101
0 votes
0 answers
138 views

ghostscript cannot decrypt pdf file despite providing the correct password

I have often decrypted password protected pdf files with ghostscript, which always worked with the following command: gs -q -dNOPAUSE -dBATCH -sPDFPassword=whatever -sDEVICE=pdfwrite -sOutputFile=...
See K's user avatar
  • 1
0 votes
0 answers
59 views

Prevent GhostScript to turn PNGs into JPEGs

I use GhostScript to fix/repair non-compliant/corrupted PDFs in order to let them be successfully opened by PDF readers and be edited with Acrobat Pro without errors or warnings. gs \ -o repaired....
Paolo's user avatar
  • 125
1 vote
0 answers
218 views

Ghost script prints blank pages pdfs

I am using Ghostscript to produce PDFs . The problem is that the PDF that is generated is blank. After I did a bit of research I found this solution. On this page it says that there is a bug with ...
Raducu Mihai's user avatar
1 vote
1 answer
626 views

Why does ghostscript output some pages of some PDF file with colors (of text or images) changed in red?

I'm running GPL Ghostscript 9.27 ghostscript version. I've compressed some PDF files (in Linux) through gs command probably with success (based on what I've seen). But after checking some particular ...
bonzo's user avatar
  • 31
0 votes
1 answer
156 views

gpcl6 options to create a searchable pdf form

We use gpcl6 to create pdf documents from text reports (green bar) generated on a legacy system. The command used is this: <data stream> | gpcl6 -dNOSAFE -dNOPAUSE -sDEVICE=pdfwrite -...
James B. Byrne's user avatar
1 vote
1 answer
193 views

Re-Order pages of an 'Unbooked' PDF - Batch / GhostScript / PDFtk

Preamble: 'Unbooking' a PDF has been asked before. That said, I haven't found an answer to this specific part of the process. Thanks to extensive research and a lot of help from this site, I'm halfway ...
smts's user avatar
  • 113
0 votes
1 answer
1k views

Convert eps to png with GhostScript on Windows

If I have some .eps files e.g pic00.eps, pic01.eps, ... Then on Linux I convert them to .png files by running the command: gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=png16m -r600 -sOutputFile=pic%...
Stéphane Laurent's user avatar
0 votes
1 answer
559 views

Command line for ghostscript to suppress print dialog and write to stderr instead

I started my solution with what was suggested here GhostScript print to network printer in silent mode And came up with this as a command line gswin32c.exe -dPrinted -dBATCH -dNOPAUSE -dNOSAFER -q -...
Trevor's user avatar
  • 101
1 vote
0 answers
191 views

Convert PDF to grayscale on Linux, *without adding transparency*

I have a color PDF which doesn't use transparency. I would like to convert it to a grayscale PDF also without transparency on Linux. The common answer to converting a PDF to grayscale is to use ...
Cactus's user avatar
  • 213
3 votes
1 answer
154 views

Compressing pdfs

I've been using a web service at ilovepdf.com to compress some PDF files. And by some, I mean "several hundred to several thousand". The output files look identical (to my eye) and weigh in ...
John O's user avatar
  • 725
1 vote
0 answers
116 views

Add annotations for specific PDF pages using the command line [closed]

I have a PDF with 5 pages, and would like to add the annotations note 3 and note 4 at pages 3 and 4; where or how the annotations are styled doesn't matter. It should be an FOSS based solution.
hyiltiz's user avatar
  • 458
1 vote
1 answer
483 views

Chop pages of a PDFs horizontally WITH overlap

I want to convert a pdf file so that each page is cut horizontally into two pieces, with some overlap. My machine is mac and I'm now using mutool with the following command: mutool poster -y 2 in.pdf ...
Chav Likit's user avatar
-1 votes
1 answer
442 views

PDF Files Compression Ghostscript

Can someone check the code and find what is wrong ? I fight with it some time and don't have a clue whats wrong... I get error: '-sDEVICE' is not recognized as an internal or external command, ...
Kamil's user avatar
  • 11
1 vote
2 answers
1k views

Ghostscript with mswinpr2 is slow, how to make it faster?

I'm using the following command to print a pdf file. "C:\Program Files\gs\gs9.52\bin\gswin64c.exe" \ -dBATCH \ -dNOPAUSE \ -dFitPage \ -c "mark /OutputFile (%printer%...
xralf's user avatar
  • 64
1 vote
1 answer
2k views

Failing to convert JPG to PDF with GhostScript

I'm trying to apply a recipe shared in other posts, but it fails for a reason I can't understand: c:\tmp>gswin64c -sDEVICE=pdfwrite -o output.pdf "c:\Program Files\gs\gs9.50\lib\viewjpeg.ps" -c "(...
mrgou's user avatar
  • 221
1 vote
1 answer
2k views

Print pdf with gsprint.exe error

I'm trying to print a pdf file with the following command: gsprint.exe doc.pdf It writes this error: Current allocation mode is local Last OS error: Permission denied GPL Ghostscript 9.50: ...
xralf's user avatar
  • 64
1 vote
1 answer
202 views

changes in GS 9.27 for /ebook with CMYK? (black color turns red)

I have a script that reduces sizes of CMYK PDFs. This script works in 9.26 very well, and now I have changed to 9.27 on the staging systems. I see the black color in some PDFs change to red. I just ...
pebwindkraft's user avatar
2 votes
0 answers
78 views

Unattended PDF merge and print

My company is using an invoicing software that creates 3 ways invoice (original, duplicate and triplicate) as separate files which are sent to printer. We need our printer to staple them automatically ...
SkilledNoob's user avatar
0 votes
1 answer
2k views

How can I fix a pdf that can only be opened with mupdf?

I have a pdf file which can only be opened with mupdf (both desktop and mobile) I've tried opening the same file with evince, okular, foxit reader and with my kindle paperwhite 2018. I ultimately ...
RMPR's user avatar
  • 141
0 votes
1 answer
193 views

Universal Command-Line Tool Wrapper

I have a program that calls GhostScript in the background by issuing a shell command with hardcoded(!) parameters. Unfortunately it is impossible to change that in a defined matter and the used ...
Robert Orso's user avatar
1 vote
0 answers
361 views

How can I get emacs to print PDF on Windows with pdftools?

If you've walked the emacs road you know how amazingly powerful it can be, and how absolutely useless. Full disclosure: my 4800 line initialization file (soon to be 3000) does manage to load 125 ...
F. Certainly.'s user avatar
0 votes
2 answers
366 views

Is it possible to compress PDFs with Ghostscript and keep cross references intact?

I have since quite some time used the following batch file (or similar ones) to compress my pdfs. C:\"Program Files"\gs\gs9.26\bin\gswin64 -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH ...
bkleine's user avatar
  • 101
1 vote
0 answers
503 views

Imagemagick 7.0.8-59 Error Message when Compressing PDF files

I am trying to compress a PDF with this Command: mogrify -compress jpeg -quality 50 path/to/file/* When running the Command I get this error message: Error: ICCbased space /N value does not match ...
gernot's user avatar
  • 11
2 votes
0 answers
2k views

Print to PDF with Ghostscript: output is PS, not PDF (using MFILEMON)

Shouldn't PDF files start with %PDF? I'm attempting to use MFILEMON 1.5.2, as recommended here on Stack Overflow, and GhostScript 9.26 to create a "Print to PDF" printer on a fresh Windows ...
whiskeychief's user avatar
1 vote
1 answer
148 views

Ghostscript's /ebook preset creating some undesired effect on PDF but /printer doesn't

I would like to use ghostscript (version 9.27) to batch compress big quantities of pdf files. The best option for me regarding compress ratio is -dPDFSETTINGS=/ebook, since it is able to reduce my ...
Micho.bojcevski's user avatar
1 vote
0 answers
1k views

Ghostscript - append merge pdf into single file

I need to merge multiple pdf's into single file which I'm doing like this: gs -q -sDEVICE=pdfwrite -sOutputFile=aio.pdf aio_single.pdf another.pdf and it is working, but it is extremely slow (~5 ...
breq's user avatar
  • 121
1 vote
0 answers
81 views

Why, just after installing Gostscript 9.27 on my Mac OS 10.13, I can not print PDFs anymore?

Just after installing Ghostscript-9.27 on Mac OS 10.13 (to work on Scribus), my printers refuse to print PDFs, while it prints other file formats. The printer indicates: Stopped - Failed to "Filter" ...
Jean-François Astoury's user avatar
1 vote
1 answer
114 views

PDF preview black on iPhone/Mac+Safari

Does anyone have a clue why on PDF previews some areas are turning black on iPhone, iPad or Mac+Safari? Everything works fine in Windows with any browser. We are linking from our website straight to ...
Marcel Gantert's user avatar
1 vote
1 answer
2k views

Compress PDF to 2MB or less

I have PDF files, tonnes (~1000) of them for a government report, varying from 600kb to 500MB. Problem is that the portal only allows upload of files up to 2MB. I have Windows (which I find fairly ...
Jesse P Francis's user avatar
2 votes
1 answer
793 views

Rendering any latex in Inkscape does not work anymore

The issue is being discussed on Inkscape's repository here: https://gitlab.com/inkscape/extensions/issues/73 Since I last upgraded Inkscape 0.92.4 (45b59e7, 2019-03-20), and probably its dependencies ...
Robin Vogel's user avatar
1 vote
1 answer
91 views

Working with glyphs from multiple documents to rearrange a PDF

I am doing some editing on an old PDF comprising vector text and math formulae. Precisely I am extracting one of the problems of an exam paper, so after extracting the corresponding pages, I still ...
ysalmon's user avatar
  • 203
3 votes
1 answer
1k views

Change format of images (from PS to EPS) using Ghostscript

I have a question from experts in using Ghostscript. I am new in using this software. How can I change the format of an image from PS to EPS using Ghostscript?
Zahra's user avatar
  • 31
1 vote
1 answer
2k views

Powershell Convert new files to tiff

I have a powershell script that I frankensteined together that looks at a folder for newly added files, then moves those files to another folder that then gets converted using ghostscript to a .tif. ...
Tohny.Johnson's user avatar
0 votes
2 answers
1k views

How can I create a .prn file from a TIFF?

I have an industrial printer that requires .prn files to print. I'd like to automate generation of these files using software I write. We start with TIFF files, and then we use special software from ...
Chad Johnson's user avatar
0 votes
1 answer
1k views

install ghostscript 9.25 in Ubuntu

I come across this issue and need to downgrade ghostscript to 9.25. Current Ghostscript version is 9.26 but I need to install 9.25 on my Ubuntu 18.04. Is there any way to do that properly with '...
Mg Thar's user avatar
  • 103
1 vote
1 answer
2k views

Unable to execute Ghostscript from command prompt

I have been using this code to reduce the size of a pdf file: cd C:\Program Files\gs\gs9.25\bin gswin64c.exe –h Gswin64c –sDEVICE=pdfwrite –dCompatibilityLevel=1.4 –dPDFSETTINGS=/printer –dNOPAUSE –...
shani's user avatar
  • 11
0 votes
1 answer
293 views

How to split colored and grayscale pages of a PDF?

How do I split colored and grayscale pages of a PDF in Linux, so I can print with less cost?
afedersin's user avatar
1 vote
0 answers
236 views

How to change screening (halftone pattern) of my printer Cups driver?

I am using CUPS with the printer driver which use "application/vnd.cups-raster 10 rastertopj" and i am trying to get the look of dither 4x4 print/output but i am clueless where to change the setting ...
Sam's user avatar
  • 11
1 vote
0 answers
422 views

Adding margin to rasterized PDF using ghostscript

I'm cropping and rasterizing some PDFs using ImageMagick. In order to remove some text that I don't need, I want to crop to a smaller box than needed and then readjusting the page size adding some ...
David's user avatar
  • 111
0 votes
1 answer
350 views

Ghostscript install on Windows

I've installed Ghostscript on Windows but there seems to be a bug. The executable gs9win64.exe won't run any commands. Always gives me similar error messages. Even if I just give it: GS> -h (...
Norm's user avatar
  • 1
0 votes
1 answer
1k views

How do I batch extract first page of multiple pdfs

I know there is another thread with many answers for this question; however, I am a newbie and a lot of that was gibberish to me. I am trying to learn though:) Anyway, I've installed ghostscript and ...
Emily Ward's user avatar
0 votes
0 answers
412 views

Ghostscript / GhostPDF print several pages into one PDF

I need to print several times different pages and gather them into a final resulting PDF. I have had this setup and configuration on a company laptop a few years ago but I can't get it to work now on ...
Daniel W.'s user avatar
  • 1,912
0 votes
1 answer
691 views

GhostScript | LibreOffice. Is there a way to change page order before printing?

I've got one typed story to print as a small (A5) book, and my wife is willing to sew pages together. But one problem is, pages in document must be in specific order: 4-1-2-3-8-5-6-7-etc. First I ...
MadBrozzeR's user avatar
0 votes
1 answer
951 views

Ghostscript - create a pdf with multiple identical pages and keep size down

Im trying to use Ghostscript to create a PDF with multiple identical pages. I will later use this together with another multipaged PDF to stamp on unique information onto every page. Is it possible ...
Sultanen's user avatar
  • 101
5 votes
1 answer
966 views

GhostScript 9.20 - successor to -dUseCIEColor?

I'm using a script to batch convert scanned PDF 1.4 (or before) to PDF/A-1b. The script looks like this: #!/bin/bash for i in *.pdf; do gs -dPDFA -dBATCH -dNOPAUSE -dUseCIEColor -sProcessColorModel=...
Paul Bergström's user avatar
1 vote
1 answer
1k views

Uninstall GhostScript installed from source on CentOS server

I have installed GhostScript 9.21 from source into /usr/local and want to remove it and use the OS-default version instead. The GS Makefile has no "uninstall" option and I cannot find any articles ...
Reado's user avatar
  • 451
4 votes
2 answers
2k views

Ghostscript unknown device "psmono"

Several pages in Internet and several answers here in StackExchange contains ghostscript commands whith the option -sDEVICE=psmono. But when I execute those commands, the ghostscript returns an error ...
Seninha's user avatar
  • 143