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
1 answer
12 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 -...
user avatar
1 vote
1 answer
27 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 ...
user avatar
  • 113
0 votes
1 answer
332 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%...
user avatar
0 votes
0 answers
49 views

Counting B/W vs. colored pages in a PDF leads to "file not found" error in console

Following the question here Count BW / color pages in PDF ( I would ask there but I lack the reputation. ) I try to count PDF pages that are color. When I use the code gs -o - -sDEVICE=inkcov ...
user avatar
0 votes
1 answer
178 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 -...
user avatar
  • 101
1 vote
0 answers
33 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 ...
user avatar
  • 213
3 votes
1 answer
89 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 ...
user avatar
  • 715
1 vote
0 answers
62 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.
user avatar
  • 398
0 votes
1 answer
322 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 ...
user avatar
-1 votes
1 answer
196 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, ...
user avatar
  • 11
1 vote
2 answers
781 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%...
user avatar
  • 64
1 vote
1 answer
1k 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 "(...
user avatar
  • 181
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: ...
user avatar
  • 64
1 vote
1 answer
130 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 ...
user avatar
2 votes
0 answers
72 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 ...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
  • 131
0 votes
1 answer
102 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 ...
user avatar
1 vote
0 answers
284 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 ...
user avatar
0 votes
2 answers
161 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 ...
user avatar
  • 101
1 vote
0 answers
409 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 ...
user avatar
  • 11
2 votes
0 answers
1k 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 ...
user avatar
1 vote
1 answer
86 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 ...
user avatar
0 votes
0 answers
885 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 ...
user avatar
  • 111
1 vote
0 answers
53 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" ...
user avatar
1 vote
1 answer
89 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 ...
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 ...
user avatar
2 votes
1 answer
494 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 ...
user avatar
1 vote
1 answer
69 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 ...
user avatar
  • 183
3 votes
1 answer
734 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?
user avatar
  • 31
1 vote
1 answer
1k 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. ...
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 ...
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 '...
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 –...
user avatar
  • 11
0 votes
1 answer
247 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?
user avatar
1 vote
0 answers
196 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 ...
user avatar
  • 11
1 vote
0 answers
361 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 ...
user avatar
  • 111
0 votes
1 answer
279 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 (...
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 ...
user avatar
0 votes
0 answers
350 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 ...
user avatar
  • 1,792
0 votes
1 answer
620 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 ...
user avatar
0 votes
1 answer
756 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 ...
user avatar
  • 101
4 votes
1 answer
789 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=...
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 ...
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 ...
user avatar
  • 143
0 votes
1 answer
267 views

GhostScript: rendering PDF fonts as glyphs - aborts because 'Could not find default_gray.icc'

This script used to work for me, rendering fonts in a PDF as glyph paths so they don't come out crippled when editing the file in Inkscape: #!/bin/sh if [ "x$1" = "x" -o "x$2&...
user avatar
1 vote
1 answer
446 views

pdfcreator and ghostscript : create PDF with text not compressed

We are using PDFcreator 2.3.2. It installs and calls Ghostscript 9.11 to create the PDF output. We have to create PDFs with inside text not compressed. The text inside the PDFs must be ASCII or ...
user avatar
  • 145
0 votes
0 answers
39 views

How to make notes of pdf files having around 500 pages?

I am using Ms windows and i am looking for a software that would enable me to make notes of pdf files. For pdf files, i use foxit reader and in my phd, i have to make notes of multiple papers. Right ...
user avatar
0 votes
1 answer
415 views

Get a comma-separted list of color pages in PDF

How do I get a comma-separated list of all color pages in my PDF file? Thanks to this answer I can get a list of all Page numbers and a note for a color page. gs -o - -sDEVICE=inkcov input.pdf | ...
user avatar
  • 163
2 votes
0 answers
1k views

How to create a correct (grayscale) PDF/X-3 file using Ghostscript

I’m trying to convert arbitrary PDF files (a magazine created with pdfLaTeX, containing some photos, but also some graphics such as webcomics) to valid PDF/X-3 using Ghostscript and I want the result ...
user avatar
  • 148
-1 votes
1 answer
543 views

OCR messed up by Ghostscript

Last year there was a bug found in Ghostscript. It is documented here: http://bugs.ghostscript.com/show_bug.cgi?id=696116 It is marked Status: RESOLVED WONTFIX In the end the assignee, Ken Sharp,...
user avatar