Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
94 views

Ghostscript fails when input files have non-ASCII characters (like ª)

I want to merge two PDF files but when the input filename has some special characters such as ª or º etc., it fails to merge. With an input filename like MªRose.pdf. try SetLength(Arg, 7); Arg[...
Zink's user avatar
  • 13
0 votes
1 answer
35 views

Ghostscript is returning exit code 0 if password is not set to decode encrypted PDF file

We are trying to transform password protected PDF file using Ghostscript without setting password. We are seeing the below error. **** Error: Couldn't initialise file. Output may be incorrect. No ...
Pavan Kumar Tiruvaipati's user avatar
0 votes
1 answer
148 views

how to convert jpg to pdf using ghostscript in Delphi

I have read and test many things in internet about this issue with no solution. I want to convert a jpeg to pdf file usin ghostscript dll in Delphi 7. the code below creates an empty pdf file. ...
Zink's user avatar
  • 13
1 vote
1 answer
49 views

Pass argument from GhostScript CLI to PostScript

I'm using Ghostscript to convert PDF to PDF/A files, which works fine. I want to use the -dSAFER option, which forces me to use absolute path name for the ICCProfile in the file PDFA_def.ps: % in the ...
rabudde's user avatar
  • 7,722
0 votes
0 answers
48 views

Define output rectangle when creating PDF from PostScript with GhostScript

I have some old PostScript files and try to convert them to PDF files with GhostScript. Unfortunately the PostScript files use some custom paper size (16" x 20") as following: featurebegin{ %...
Michael Hartmann's user avatar
0 votes
0 answers
85 views

Text added in the pdf in Firefox or Evince or Okular is displayed with rectangles?

My Question is about font rendering in pdfs. I'm adding text to a pdf using the rust library for pdf operations lopdf. I'm using the Tj operator with Courier Font and encoding the text in hexadecimal :...
C Taque's user avatar
  • 1,097
2 votes
1 answer
143 views

Using Ghostscript to add page numbers via batch

I am trying to add pages to PDFs in the format page out of total_num_pages, I have about 100K documents to process, so I need to figure out a way to do this with many documents. I have a batch file ...
Peter Sun's user avatar
  • 1,835
0 votes
0 answers
70 views

How to add Overprint Fill on text in PostScript file

I have a ghost command that gets PGB PDF as input and generates CMYK PDF. What I need to achive is to make the text overprinted, so when I open the PDF in Adobe Acrobat -> Use print production ->...
K S's user avatar
  • 11
0 votes
1 answer
154 views

How to handle spaces in filepath of ghostscript commands

I'm trying to run a ghostscript(10.01.2) command to convert a pdf to pdf/a through a Python subprocess call on Windows 10: subprocess.call(f(gs -dPDFA=2 -dBATCH -dNOPAUSE -dAutoRotatePages=/None -...
feakej's user avatar
  • 1
0 votes
0 answers
54 views

How to reduce PCL file size while converting pdf to pcl using ghost script?

I am converting a PDF file to a pcl format using ghostscript. Size of pdf file is 70kb but when I convert to PCL file then size becomes very large like 700kb for 300 resolution and 2mb for 600 ...
Prasanth Bp's user avatar
0 votes
0 answers
61 views

Conversion from PDF to image fails in ghostscript

I need to convert the first page of a PDF file into an image using GhostScript, but I cannot manage to get an acceptable output file. I am calling the C++ library (ver. 10.03.0) directly from C# using ...
Davide Vitiello's user avatar
0 votes
0 answers
229 views

Ghostscript (ps2pdf) Not Handling UTF-8 Input File

I'm trying to use ps2pdf to convert a Postscript file to PDF, but the Postscript file has a UTF-8 character in it which is not rendered properly. We have a website with a database, where users can ...
asosat's user avatar
  • 39
0 votes
0 answers
260 views

GhostScipt High CPU Usage

I am facing an issue of High CPU usage while compressing files. The scenario i have is a .Net WebService, that compresses PDF Documents with about 500kb. I have a balanced two servers infrastructure, ...
gustavo pedro's user avatar
0 votes
0 answers
78 views

How to print a remote PDF file with gsprint (+python later on)?

I am currently trying to print a remote pdf with gsprint/ghostscript but ghostscript fails with a /undefinedfilename error. The goal is to do this with python later on, however first I need to get the ...
pixeled's user avatar
  • 11
1 vote
0 answers
1k views

Convert PDF to PDF/A using python

I'm trying to use a Python module or a subprocess script to convert PDF files to Archivable PDF/A format compatible with all versions. The difficulty I'm facing is validating the files. my script runs ...
John Kiruba's user avatar
0 votes
0 answers
56 views

ps2write rasterizes Type1C font

While using Ghostscript's ps2write device with documents containing TrueType or Type1 fonts works fine, it appears that given a document with a Type1C font it produces a Type3 bitmap font. I am ...
Stefan Schmidt's user avatar
0 votes
1 answer
162 views

Merging PDFs with gs generates /undefinedfilename error

I have a directory where PDFs I would like to merge are downloaded. The order of merge should be the order of downloads (i.e., the first PDF to merge is downloaded first, the second PDF to merge is ...
dashmile's user avatar
0 votes
0 answers
61 views

PDF-cropping and printing (gs and lp) printing the wrong section, but works using GUI

I've written a small script - on MacOS - designed to do two fairly simple things - crop a PDF (a 4 x 6 shipping label) at a given file path, and then print it. I'm using ghostscript for the cropping, ...
user1381745's user avatar
  • 3,900
0 votes
3 answers
623 views

XML file doesn't get attached into the PDF while using ghostscript

My goal is to covert a pdf into a file that fits the factur-x format. I successfully converted a pdf into pdfA/3-b Here's the code: import subprocess gs_path = r"C:\Program Files\gs\gs10.02.1\...
oliver's user avatar
  • 1
0 votes
0 answers
82 views

Uncaught ImagickException: Postscript delegate failed

CentOS 7 Apache, PHP 7.4 Simple code: $ofile = 'test.pdf'; $imagick = new Imagick(); $imagick->readImage($ofile); I get: Fatal error: Uncaught ImagickException: Postscript delegate failed `[...
uana's user avatar
  • 1
0 votes
1 answer
388 views

PDF conversion with Ghostscript breaks the fonts

I'm trying to merge pdfs together with Ghostscript, but having font problems. Below screenshot - left is input, right is output. "Standard" latin parts are correct, non-standard wrong (CID?),...
JohnSmith's user avatar
  • 472
0 votes
0 answers
54 views

PDF rendering slow, need help debugging with ghostscript

We're switching over to a new PDF library and re-architecting. We were taken by surprise when told by our print shop that the new files were much slower than the originals. Each page is coming out ...
Clinton Pierce's user avatar
2 votes
1 answer
339 views

Ghostscript: Stop image rotating when converting PDF to Image

I am using Ghostscript 10.02.0 to convert a PDF to a PNG with the following command: gs -o ./test.png -dNumRenderingThreads=1 -sDEVICE=png16m -r72 -dLastPage=1 -dFitPage -dDEVICEWIDTHPOINTS=125 -...
JamesS's user avatar
  • 2,300
1 vote
1 answer
148 views

How do I fix Python Ghostscript Program printing a blank pdf file?

I am trying to print a pdf file from a folder to a hard physical copy for user use. The pdf file is good, simple label sheet(screenshot attached), the program runs good, but if I print the pdf to a ...
marcspector1972's user avatar
1 vote
1 answer
197 views

How to use /AlwaysOutline command in ghostscript pdf processing?

I have PDF with different fonts embedded. One of them is color emoji font. For some unknown reason the font with emoji crashes my printing software. The only way I found is to convert all fonts to ...
Alexander C's user avatar
  • 4,057
0 votes
0 answers
879 views

How to fix the CIDSet is incomplete on PDF

I am trying to convert a normal PDF into PDF/A3b. The normal PDF doesn't have the fonts embedded so I used Ghostscript command gs -o output.pdf -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -...
derikS4M1's user avatar
  • 119
0 votes
0 answers
644 views

How to embed unembedded fonts in a PDF?

I am currently working on a project where I need to embed fonts into an existing PDF file that has some fonts that are not embedded. My primary goal is to ensure that all fonts used in the PDF are ...
derikS4M1's user avatar
  • 119
1 vote
1 answer
71 views

When converting a PDF to a PDF using Ghos, the top title text is lost

When converting a PDF to a PDF using Ghos, the top title text is lost. Before convert: After convert: GhostScript Version: 10.01.2 gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -dPDFSETTINGS=/...
Rams's user avatar
  • 51
1 vote
1 answer
136 views

When converting a PDF to a lower-resolution PDF file with Ghostscript, the background black colour is applied to the text and icons

When converting a PDF to a lower-resolution PDF file with Ghostscript, the background black colour is applied to the text and icons. Download original PDF file My code: gs -q -dNOPAUSE -dBATCH -...
Rams's user avatar
  • 51
0 votes
0 answers
293 views

Ghost script remove duplicate embedded subset fonts

I am converting a PDF file to PDF/A file with PDF/A-2b specification with help of ghost script 9.52. gswin64 -dPDFA=2 -dBATCH -dNOPAUSE -dFastWebView -sColorConversionStrategy=...
Sanil GK's user avatar
0 votes
0 answers
190 views

Ghostscript only antialiasing some text?

I have a PDF that is an architectural floor plan with a bunch of room labels in it. Using ghostscript's -sDEVICE=txtwrite option I can see that all of the labels are indeed text and not graphics/...
Quick's user avatar
  • 353
1 vote
0 answers
198 views

PCL to PDF using GhostScript

I have to convert pcl file into a pdf file using Node JS but i don't know how to do that any help will be great. I just installed GhostScript via home brew then run the command: gs -sDEVICE=pdfwrite -...
Baran Toro's user avatar
2 votes
0 answers
479 views

Can't validate my Factur-X/ZUGFeRD file because of Specification: ISO 19005-3:2012, Clause: 6.2.3, Test number: 1

I am trying to generate valid Factur-X/ZUGFeRD file using GhostScript. I think I am very close to having a good result but there's still one last thing blocking. When I try to validate my PDF with and ...
aprotiere's user avatar
0 votes
0 answers
1k views

Using Ghostscript to compress pdf file

I'm trying to compress a pdf file using ghostscipt. I've been using both ebook and screen default parameters, but I would like to find a way to obtain a result in between the two. Is there any way to ...
Mipix's user avatar
  • 101
0 votes
0 answers
401 views

Using GhostScript to convert (any) PDF using a certain ICC profile for output?

I use (Lua)LaTeX to create a PDF for printing. The color workflow is not well-managed: The PDF contains CMYK-colored LaTeX elements, PDF figures created in Inkscape, and RGB photos. ImageMagick's ...
hschmauder's user avatar
0 votes
0 answers
356 views

OSError: tried: 'libssl.so' (no such file),During handling of the above exception raise RuntimeError("Please make sure that Ghostscript is installed"

I am not able to extract text of all pages using tabula so I was trying to run camelot on my Macbook m2. I am getting the following error logs: Traceback (most recent call last): File "/Library/...
MAYANK GARG's user avatar
1 vote
2 answers
251 views

Get part of the Filename with windows bat file and merge multiple PDFs with GhostScript

I need to group multiple PDFs with the same order number (which is shown in the PDF filenames) into a new PDF. The new grouped PDF should have a new name= only the order number. The best solution is ...
Kico's user avatar
  • 23
1 vote
1 answer
849 views

Compress a PDF with GhostScript 10.01.1 : Unrecoverable error, exit code 1

I'm trying to compress some PDF files with Ghostscript 10.01.1. The command line works for many files, but I sometimes have an error. Here is the command line : -dNOPAUSE -sDEVICE=pdfwrite -...
Runlevel's user avatar
0 votes
0 answers
40 views

How to set up TrimBox and BleedBox in Ghostscript when cropping a PDF [duplicate]

I'm trying to programmatically crop a PDF using GhostScript, which is mostly yielding the correct results. However, the TrimBox dimensions are inherited from the old PDF and nothing I have tried seems ...
PANICresponse's user avatar
0 votes
1 answer
131 views

Prevent ghost script from auto rotating thumbnail

I'm using ghostscript (gs) to create thumbnail of first page. The problem I'm facing is that sometimes it auto rotates the thumbnail. Here's the command I'm using gs -o thumb.jpeg -sDEVICE=jpeg -...
Zullu Balti's user avatar
0 votes
1 answer
1k views

Python Ghostscript Repair pdf

I have pdf Files where I recieved the message from PyPDF2 "incorrect startxref pointer(1)". Now I want to repair the pdf Files with Ghostscript and Python. I installed: pip install ...
k1ng_m4rtin's user avatar
0 votes
0 answers
434 views

How to use Ghostscript to embed fonts (ttf) into PDFs?

I modify my pdf structure adding this: /F1 << /Type /Font /Subtype /TrueType /BaseFont /MyFont /Encoding /WinAnsiEncoding /FontDescriptor 3 0 R /FirstChar 32 /LastChar 255 >> Then, I ...
Teo7's user avatar
  • 81
1 vote
0 answers
445 views

How to retrieve the number of pages of a document in nodeJs

I'm running an application that can use NodeJs to add functionalities that are not readily available. I need to find out the number of pages of pdf files, as well as transform them into tiff files. I ...
frenchie's user avatar
0 votes
1 answer
258 views

Ghostscript PDF combine file limit?

If I have a bat file on windows to drive ghostscript PDF combine like: C:\Program Files (x86)\GPLGS>gswin32c.exe -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=c:\copyfolder\combine.pdf -dBATCH c:\...
jflatus's user avatar
  • 11
0 votes
3 answers
402 views

Get SpotColor Names

Is there a possibility to get the names of the spotcolors used in a pdf? I'm using c#. Maybe there is a workaround with ghostscript? color seperation I searched the ghostscript doc but didn't find ...
LittleBigNita's user avatar
-1 votes
1 answer
318 views

Downgrade PDF version with Ghostscript 8.70: A pdfmark destination page 34 points beyond the last page 22

Background My requirement is a feature to watermark PDF docs on demand within a LAMP stack (PHP 7.3). The webapp has a collection of PDF docs loaded into a MySQL table. The docs originated as PDF ...
badams's user avatar
  • 108
0 votes
1 answer
196 views

How to render a PDF to a 4-bit greyscale image using Ghostscript

I am building an e-ink-based auto-refreshing "newspaper" as wall decoration for my home. The e-ink panel I'm using supports 4-bit greyscale, i.e. 16 different levels of grey. I am preparing ...
FlowSone's user avatar
0 votes
1 answer
167 views

Display only first two levels of bookmarks in PDF using pdfMark/ghostscript [closed]

I'm using PDFtk to combine multiple pdf files and create bookmarks in the combined pdf file. When the combined pdf file is opened I want to display only first two levels of bookmarks (file has total ...
abhijeet's user avatar
0 votes
1 answer
369 views

GhostScript: Ps2Pdf comes out blank

I'm trying to convert a .ps file to .pdf. In my code I'm creating a rectangle with "Python" write inside of it. If I run .ps in a window (tkinter window) it comes great but when I convert to ...
Diogo Barros's user avatar
-1 votes
1 answer
244 views

After read edit and write pdf ghostscript say about error

I read a pdf file and edit a color of text in him, after I replace the original stream with a new one and write all in new pdf. After i try to use a ghostscript to do a pdf a grayscale and he say ...
Maksim Polivnikov's user avatar

1
2 3 4 5
22