Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ghostscript]

The tag has no usage guidance.

0
votes
0answers
19 views

Ghostscript add Header Page to Split Document

I have a script using Ghostscript, to split PDF's, then merge them based on a set amount of pages. Is their anyway once the new merged document is created to then add a page to the beginning of the ...
0
votes
2answers
73 views

Ghostscrip Extract every nth Pages from PDF

I don't know if this can be done, I'm just learning ghostscript. Say I have multiple PDF files each about 500 Pages in length. Can I setup ghostscript to go extract every 100 pages from each ...
0
votes
0answers
27 views

How do I rotate the orientation in the ghostscript plot for ps file?

I am plotting the (postscript) ps file using the ghostscript in the terminal. When I use the command"gs file.ps", it always gives the portrait orientation like following do you know how could I ...
2
votes
0answers
24 views

PDF is corrupted after compressing with Ghostscript

Is there a way to revert a PDF after it is compressed? Every PDF is getting corrupted when it gets compressed with our script, which runs gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS="/...
0
votes
0answers
8 views

Ghostscript taking a lot of time for loading fonts while extracting text from postscript file

I want to extract the text of the first page (i.e., the cover) of the postscript file manual.ps. For doing this, I am using the following command (the sed is necessary for removing the long spaces ...
0
votes
2answers
63 views

Extract Part of a Single PDF Page from Bash

In order to extract a part of a PDF page on a Gnu/Linux machine I use the following command: gs -sDEVICE=pdfwrite -o out.pdf -g2300x2300 input.pdf The -g...x... option lets me choose coordinates on ...
2
votes
1answer
65 views

“Place” Letter Sized PDF to Larger pdf at specific position

Lulu is a print on-demand service. Part of the creation process is to upload a cover. The "cover" is 1 page that has the dimensions 17.25 inches wide by 11.25 inches high. There is a 0.125 "bleed area"...
1
vote
2answers
71 views

Error while trying to compress pdf using ghostscript recursively via loop

I intend to compress a few thousand PDF files in a folder recursively. I tried with following loop: #!/bin/bash find "/home/user/original" -type f -name *.pdf | while read -r file do gs -sDEVICE=...
0
votes
0answers
40 views

How to fix text opacity issues when converting a PDF to black and white?

I'm trying to convert a PDF to black and white but the colored text becomes almost unreadable. Is there a way to fix this ? Or a better way to make the conversion ? Command used : gs -sDEVICE=...
0
votes
1answer
260 views

What is this GhostScript error? “/undefined in /BXlevel”

At first I thought this might have been a missing font issue but as far as I can tell from the output, GS is finding the font just fine.. Any hints as to what the problem might be? $ /usr/bin/gs -...
0
votes
0answers
52 views

Trouble installing GS from source

I'm trying to install Ghostscript 9.23 from source, and getting some errors I'm not familiar with. I'm using CentOS. $ cat /proc/version Linux version 2.6.9-67.ELsmp (brewbuilder@ls20-bc1-14.build....
1
vote
1answer
204 views

ghostscript changes orientation of PDF

I have two single-page PDFs, and want to merge them into a single two-pages PDF. So I ran: gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf 1.pdf 2.pdf Problem: The result has each ...
1
vote
1answer
40 views

Finding the size (in points) of the descender of a font in Ghostscript / Postscript?

I would like to place a horizontal line immediately below some text. Is it possible to determine the distance between the baseline and lowest descender of a given font in Ghostscript, or is the ...
0
votes
1answer
344 views

How to tell libgs to use another freetype implementation?

So after a year of use my printer decided to not print anymore. After troubleshooting for a bit I noticed that the cups error log shows something like gs: symbol lookup error: <path>/libgs.so....
4
votes
0answers
577 views

problem adding cidfont to ghostscript

PREFACE I understand this is a little harder since I can't provide the actual pdf, but the question boils down to a more general ghostscript config question so I don't think the pdf is needed. I ...
1
vote
1answer
751 views

Barcodes too wide in a GoDEX printer with CUPS in Linux

I have a GoDEX RT700i printer (203 DPI) and I want to print barcodes in Linux (Ubuntu 16.04) The barcodes I have are in PDF format. There is a 8 digit number below the barcode. In Windows, there is ...
1
vote
0answers
282 views

why this ghostscript command is giving me error?

I am just trying to change the orientation of a file before piping it to lp since the -o option is not working : gs -sDEVICE=pxlcolor -sOutputFile="\|lp -dprintername" -dNOPAUSE -dBATCH -c "<</...
1
vote
0answers
159 views

Generating PDF handouts with ghostscript

I have several PPT files with slides, that I want to convert to a single PDF with slide per page + lines for notes. I then want to print that PDF and give it as handouts. What is the best and easiest ...
2
votes
2answers
852 views

Add black border around PDF file with ghostscript

I'm using ghostscript to process some PDF files, and I would like to add a thin black border around the files. Is this something that can be done with ghostscript, or are there other (non-lossy) ...
2
votes
1answer
904 views

Convert pdf font colors to monochrome black

What I want to do is convert a pdf file that has colorful fonts to one that all it's fonts' colors are black. This is not a duplicate of this question here. I don't want greyscale fonts I want them ...
1
vote
0answers
305 views

Flatten transparency in PDF to remove thin white lines?

I have a PDF created with Quark Xpress where some raster images are shown with thin white lines across them. Searching around I have found that the problem is due to the way PDFs readers apply partial ...
1
vote
1answer
566 views

Piping multiple inputs into Ghostscript

I am trying to create a one-line Linux command to combine two PDF files - which are downloaded from a URL - using Ghostscript. However, I do not want to create any temporary files (everything should ...
0
votes
0answers
595 views

how to print output of ghostscript program

In Linux, please, how do I direct output from a ghostscript program to my HP LaserJet printer? My eventual aim is to draw maps to scale from Natural Earth data . A test page from the printer is ...
1
vote
1answer
535 views

Merging pdf files using ghostscript: is it possible to pipe the find output to gs?

I want merge several pdf files into a single one. Found this great answer on SO, but there is a problem here. My pdfs are not in the same directory, so essentially I want to do a find call and pipe ...
1
vote
1answer
157 views

“gv” stubborn complaints

I use "gv" command in my scripts to view *.pdf or *.ps files (I do that instead of using "acroread" or "okular" because "gv" has a nice option "-watch" that allows me to see changes in a troff or ...
1
vote
1answer
494 views

Ghostscript + QPDF and PDF/A-1b validation: how to add EOL separator before endstreams

I'm trying to define an up to date method for converting any PDF into a PDF/A-1b able to pass 3-Heights validation. I came up with this script which uses ghostscript and qpdf: #! /bin/bash # ...
2
votes
0answers
1k views

evince: Bad PDF font rendering

I have a few PDF files which suffer the problem shown in the image: (the blue part is mouse-selected, the right part in black is how the entire document looks!) I tried /prepressing and even -...
2
votes
0answers
126 views

How to add printer to CUPS using Ghostscript hl7x0 driver?

I run Arch Linux 64-bit and strongly prefer not to add multiarch support for 32-bit software, so I do not want to install the proprietary 32-bit driver for my Brother MFC-J4710DW printer. Research ...
4
votes
0answers
106 views

How do I trace why printing pdf from Ghostscript vs Evince is different?

I'm trying to get a better sense of how the "Print to File" option works on Linux Mint. Basically, when I open a PDF with Evince and print it to PDF, the output is different from the original, and ...
1
vote
1answer
2k views

Overlay text in PDF via command line

The following command produced the result of the following image using convert, where an overlay box containing the letter "A" was layered over the PDF: convert online_gauss.pdf -fill white -...
2
votes
0answers
118 views

How to cut a really large raster image into smaller chunks?

I have a large poster as a pdf-file. I need to create a raster image from it (for instance because there seems to be no pdf viewer which allows me to zoom sufficiently to see the contents). So I ...
3
votes
1answer
178 views

Extract completed slides of a slide show PDF

PDF files of slide show presentations distributed by my lecturers often contain a huge number of pages, because each animation step results in an new page (sometimes 20 pages per slide). This is nice ...
33
votes
1answer
26k views

Convert pdf to a different page size (US Letter -> A4)

I'm trying to print a simple US Letter document, but for some reason, I just cannot manage to fit it properly onto A4 when printing multiple pages per-list. I have tried converting the pdf using: gs -...
2
votes
2answers
2k views

Splitting a PDF file with Ghostscript results in one extra blank page

I try to split the pages of one PDF file into a separated one-page PDF files. This command does the job so far: gs \ -q \ -dQUIET \ -dSAFER \ -dBATCH \ -dNOPAUSE \ -dNOPROMPT \ -dAutoRotatePages=/...
2
votes
1answer
736 views

All PDF applications mix the width and height of a PDF file

I have this PDF file created by scanning. When viewing it in any PDF viewer, the page's width is greater than the height. But it seems like all the PDF applications I have tried mistake the width as ...
5
votes
4answers
2k views

How can I convert a scanned PDF with OCRed text to one without OCRed text?

I have a scanned PDF file, with low-quality OCRed text. I would like to have a PDF file without the OCRed text. How can I convert a scanned PDF with OCRed text to without OCRed text? I am thinking ...
1
vote
2answers
830 views

X11 Issues running with Terminal.app

I am trying to figure out why I can't use ghostscript or ghostview (or any other X11 applications) when I try to call them in the Terminal. I am using bash, and I also used Fink to get the packages I ...
1
vote
0answers
214 views

Using X11 Displays through Terminal.app commands : generic mapping tools

I am trying to figure out why I can't use ghostscript or ghostview (or any other X11 applications) when I try to call them in the Terminal. I am using bash, and I also used Fink to get the packages I ...
1
vote
1answer
5k views

gs can't find the proper font

I am running the following command to add bookmarks to a pdf file. The file bookmarks.txt contains bookmarks in Chinese characters and in pdfmarks format. The output of gs shows that there seem to be ...
1
vote
1answer
1k views

How do I set up a PostScript print queue to share a PCL laser printer and add PS fonts?

I would like to take a $100 PCL-compatible laser printer and hook it to my home network either through Wi-Fi or by connecting it directly to a Linux server by USB. Instead of using the manufacturer-...
5
votes
6answers
10k views

Can't print to PDF using cups-pdf; used to work, now “failed to set file mode” printing as non-root

Here's something really odd: something that used to work fine in Debian, and then broke, even without a dist-upgrade. I used to be able to use the CUPS PDF virtual printer to print anything to a PDF ...
15
votes
4answers
29k views

How to convert a color pdf to black-white?

I'd like to transform a pdf with some coloured text and images in another pdf with only black&white, in order to reduce its dimensions. Moreover, I would like to keep the text as text, without ...
5
votes
1answer
14k views

Merge several eps files into one PDF

I have several hundred encapulated postscript files, and I want to merge them all into one big PDF. How can I do this?
5
votes
3answers
19k views

Install Ghostscript v 9.05 (or newer) on CentOS

I need to use the ghostscript inkcov device on my CentOS server. The device is said to be available on GS versions 9.05 and newer. However, yum install ghostscript installs version 8.70. What is the ...
8
votes
1answer
2k views

How to convert a pdf to 4-up in landscape mode (ideally using ghostscript)?

I have pdf slides in landscape mode and would like to create a new pdf file containing the slides 4-up (in landscape mode again) like this: ----------------- | 1 | 2 | ----------------- | 3 ...
4
votes
2answers
9k views

How to rotate an image in gs

How can I rotate an image with ghostscript? I am visualizing eps to screen. I am using the command: gs image.eps
10
votes
1answer
4k views

How to make ghostscript not wipe PDF metadata

Ghostscript wipes the PDF metadata like author, title, subject etc. How can I tell ghostscript not to touch the metadata? I invoke it as follows: gs \ -dBATCH \ -dNOPAUSE ...
1
vote
0answers
37 views

Rescale a PDF file [duplicate]

Possible Duplicate: How to change height and width of each page of a pdf Is it possible to rescale a PDF file (retaining perspective) to be within a maximum width / height? Rendering to an image ...
4
votes
1answer
2k views

Implementing a String -> PDF Stamp tool

I wrote a little shell function which creates a fixed-size PDF file (A4) from a character string using gs: make_stamp() { file=$1 string=$2 tmp=${file}-small.pdf gs -o "$tmp" -sDEVICE=pdfwrite -...
0
votes
0answers
2k views

How to update ghostscript

First: what's the difference between gs and ghostscript? thiago@vaio:~$ gs -v GPL Ghostscript 9.06 (2012-08-08) Copyright (C) 2012 Artifex Software, Inc. All rights reserved. thiago@vaio:~$ ...