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.
2,266
questions
-1
votes
0
answers
27
views
Ghostscript compress fillable pdf [closed]
I would like to use Ghostscript to compress the fillable file. However, when I compress the fillable pdf, the pdf become flatten and cannot edit anymore. Is there anyway to compress the fillable pdf ...
1
vote
0
answers
22
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 ...
-1
votes
0
answers
22
views
Element missing while converting pdf from rgb to cmyk using Ghostscript
I tried converting a rgb pdf to cmyk, using command like
gs -o print_cmyk.pdf \
-sDEVICE=pdfwrite \
-dPDFSETTINGS=/prepress \
-dEncodeColorImages=false \
-dEncodeGrayImages=...
-1
votes
1
answer
71
views
GhostScript convert pdf to text [closed]
I want to convert a pdf file containing tables (swimming competitions results) to a text file. The purpose is to use the text file as data file for data processing.
The configuration I Am running is:
...
-1
votes
0
answers
18
views
From shell save ghostscript inkcov result in a file
When I launch this command from the Windows shell:
gswin64.exe -o - -sDEVICE=inkcov my_file.pdf
It works well but the result is displayed in a temporary Ghostscript windows (it closes once the ...
0
votes
1
answer
45
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:\...
0
votes
3
answers
97
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 ...
-1
votes
1
answer
74
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 ...
0
votes
1
answer
31
views
Pytest not able to find shared object .so
I'm using ghostscript as a dependency in my docker container. For that, I've installed both the library and C deps:
FROM python:3.9.5-slim-buster
...
RUN apt-get install -y ... ghostscript python3-tk`...
1
vote
1
answer
51
views
Can anyone tell me what's wrong with this tiny Postscript image file?
I am trying to programmatically create Postscript files in an embedded system.
Everything has been going fine until I tried to add an image.
My tiny test file results in an error when I test with ...
0
votes
1
answer
61
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 ...
0
votes
1
answer
67
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 ...
0
votes
1
answer
73
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 ...
-1
votes
1
answer
52
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 ...
0
votes
1
answer
96
views
Extract images from PDF page section
I need extract images from a PDF page section.
For example consider there is a PDF page which has couple of images on top of the page & couple of images on bottom of the page. I want to extract ...
0
votes
0
answers
68
views
What is the correct encoding to read and write PostScript files
I would like to parse a PostScript file, find appropriate line number and insert a PostScript command. So, I need to read the whole file and write it as a new file along with the new commands I want ...
-1
votes
1
answer
62
views
'microsoft print to pdf' makes pdf image no clear
I print qr.bmp into qr.pdf with 'microsoft print to pdf'.
Original qr.bmp is pure black (RGB 0,0,0), and perfect clear.
But qr.pdf is vague, not clear.
how to get clear image from pdf (or microsoft ...
0
votes
0
answers
35
views
Ghostscript not silent print pdf on HP printer
This code slient print on other printers,but on HP LaserJet Pro M402-M403 PCL 6 will popup printer select dialog.
gsapi_init_with_args(ptr, 12, new string[] {
"-empty",
...
0
votes
0
answers
44
views
Python 3 piping Ghostscript output to internal variable
I'm loosing my head trying to make work this piece of code. I want to pipe the Ghostscript's data output of
'-sDEVICE=ink_cov' to an internal variable instead of using a external file that I must read ...
0
votes
1
answer
67
views
How to add GhostScript NuGet package to Azure Function App?
I am trying to create an Azure Function App that merges a set of documents into a single PDF. I also need to convert some images to PDF and include those in the merged output file.
I have a working ...
0
votes
0
answers
22
views
How do I add the Calibri font to GhostScript?
I need to give readers the option of using either Acrobat Distiller or Google Drive.
Present code defaults to courier on drive.
0
votes
0
answers
99
views
Convert PDF to PDF/A-2u using Ghostscript/itextsharp
i need to convert a existing PDF into PDF/A-2u using Ghostscript or itextsharp. i am searching in stackoverflow, not able to get exact resolution. Let me know is there any way to achieve this ...
0
votes
0
answers
10
views
Is there a way to convert a ps file with ghostscript on Windows without access to the command prompt (cmd)?
I hope that I find the right words to explain my problem. I want to convert an adobe illustrator file to png on a Windows machine where I have no admin rights, no Adobe Illustrator and no access to ...
1
vote
1
answer
115
views
How to center text on page in PostScript for CID-Keyed fonts converted from ttf related to Indian Languages?
This post is sequel to Conversion from ttf to type 2 CID font (type 42 base font)
How to write a postscript program that centers a text generated from character set of CID-Keyed fonts on a page?
Note: ...
0
votes
0
answers
30
views
Camelot ghostscript issue
I am using camelot for pdf table extraction using the below code:
tables=camelot.read_pdf("abc.pdf",pages='all',flavor='stream') in my system using virtual environment. But in case of others ...
1
vote
1
answer
328
views
How to implement Unicode (UTF-8) support for a CID-keyed font (Adobe's Type 0 Composite font) converted from ttf?
This post is sequel to Conversion from ttf to type 2 CID font (type 42 base font)
It is futile to have a CID-Keyed font (containingCIDMap that enforces Identity Mapping i.e Glyph index = CID) without ...
0
votes
0
answers
131
views
PDFCROP fails at GHOSTSCRIPT execution
I've got following error on my windows machine (Windows 10 Enterprise, 64-bit) using PDFCROP 1.40, 2020/06/06:
!!! Error: Cannot call ghostscript `mgs' (No such file or directory/The system cannot ...
-1
votes
1
answer
50
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....
1
vote
0
answers
251
views
Ghostscript does not recognize the presence of CID-keyed font entry in Fontmap file
I have CID-keyed font NotoSansTamil-Regular.t42 which has 534 Tamil and Latin Glyphs and is stored in folder F:\cidfonts.
These Glyphs will be printed by a postscript program NotoSansTamil-Regular.ps ...
3
votes
1
answer
527
views
Conversion from ttf to type 2 CID font (type 42 base font)
I have ttf font files for Indian languages such as Tamil, Telugu, Malayalam, etc.
In order to access ttf files through a postscript program, I have to convert them to Type 2 CIDfont (Type 42 base font)...
0
votes
1
answer
265
views
What does this ghostscript error means undefinedfilename in
I want to run the Ghostscript command for drawing lines from a C program. I am using execlp() system call to run the command. When I am trying to run the command for line drawing from terminal/C, I am ...
0
votes
0
answers
41
views
I have a problem with the encoding of the characterset in a pdf
I have a customer who is receiving orders in a pdf. Of course there is an amount mentioned. I use ghostscript to make a picture of it.
The funny thing is that the euro sign is translated to a chinese (...
0
votes
0
answers
21
views
Ghostscript read permissions debugging in visual studio iisexpress
Hi All: I have a website that generates a single-page PDF using iTextSharp and converts it to JPG using Ghostscript.net (1.2.3) and latest 64-bit libraries.
The process works fine when the website is ...
0
votes
0
answers
39
views
Swedish characters not rendered correctly when generating a pdf-file from pcl_file using ghostpdl(v.9.56.1)
I have a *.pcl file which has some Swedish characters encoded in ISO-8859-1. When I try to convert it to pdf everything looks fine except the Swedish characters(which are removed from the pdf).
So ...
1
vote
3
answers
200
views
How to make invisible (e.g. OCR) text visible after removing text-images from PDF with Ghostscript
I used gs -o 'out.pdf' -sDEVICE=pdfwrite -dFILTERIMAGE 'in.pdf' to remove all images from some PDF files to minimize their file sizes. Now in some of those PDFs, the result is invisible text, as they ...
-1
votes
1
answer
104
views
Why are images in pdf sometimes sliced into multiple images?
Noticed that images sometimes are sliced up in PDFs.
Steps:
insert an image with a high resoultion (3000x1800) into a .docx
use "Microsoft Print to PDF" option of Word to convert to PDF
...
0
votes
1
answer
65
views
Error when I run ghostscript command on centos 7
I have installed Ghostscript on CentOS 7 server.
When I simply command gs it return following
GPL Ghostscript 9.25 (2018-09-13)
Copyright (C) 2018 Artifex Software, Inc. All rights reserved.
This ...
0
votes
0
answers
103
views
Why would ImageMagick & Ghostscript work in CMD but not in PHP?
We are migrating from a Windows 2012 Server to a Windows 2019 server. We have been using ImageMagick as Imagick in PHP and Ghostscript to convert PDF files into JPG files for quite some time without ...
0
votes
0
answers
86
views
Ghostscript fails to convert PDF file RGB to CMYK with no error at AWS Lambda C++ Runtime
I've being messing around with the Ghostscript C API and built a simple command line tool to convert PDFs from RGB to CMYK. It works a charm on my Ubuntu 20.04. So I went ahead and gave this tool a ...
-1
votes
1
answer
157
views
why is ghostscript replacing embedded fonts?
well I've given up. I don't think I understand how GS works... as far as I understand GS replaces all fonts that are not embedded and should not touch already embedded ones? why is it replacing them? ...
-1
votes
1
answer
35
views
ghostscript generates header in resulting pdf
I have a pdf with form fields on it. I want to "flatten" this into a pdf without form fields but when i run the original pdf through ghostscript, the resulting pdf file has a banner at the ...
0
votes
1
answer
52
views
How to get Total Number of Pages of a PDF using Ghostscript and Python
I didn't found a python compatible script to count the number of pages inside a PDF using python with Ghostscript.
I want to save the number of pages in a python variable.
Command line scripts are ...
0
votes
0
answers
16
views
Redmon to create JPG using argument file
Hi I am new to Ghostscript n Redmon I created a virtual printer using GS and Redmon
I want to create a JPG file. It works but I have to create two Virtual Printer for Portrait and Lanscape as both ...
0
votes
0
answers
137
views
Ghostscript rasterizer.GetPage returns null c#
I´m trying to get an image from PDF with Ghostcript.NET in C#. I have installed Ghostscript dll already (both 32 and 64 bit) and added the reference in the proyect. I´ve just taken the example for the ...
3
votes
2
answers
187
views
How to apply custom halftone to ghostscript conversion of PDF file to bitmap
I have a PDF file with a grayscale image that I'm trying to convert to monochromatic bitmap (1 bit per pixel) using ghostscript. I can get everything to work fine, but I don't like the way the ...
0
votes
0
answers
54
views
Generate Postsript file form google chrome
When I try printing files from google chrome as a postscript file and then I convert them to a pdf file, The result I cannot recognize the text in the pdf file. But when I try printing from the ...
0
votes
0
answers
60
views
Empty file with Ghostscript PDF printer and "big" page size
I need to generate PS (or PDF) files from CAM350 (an application that manage Gerber files) running on Windows 7 x64. From CAM350 there is no way to save PS or PDF files so I use a "Ghostscript ...
0
votes
2
answers
78
views
Extract text from PDF file with password protection
I am trying to extract text from specific pages of PDF files protect with password.
I am try to use pdf2txt %my_file.pdf% but I could not make the command understand the password input or page as ...
-1
votes
1
answer
284
views
Set GhostScript dPDFSETTINGS to your desired dpi
I'm very new to the GhostScript world and I was wondering how to set the configurations that i faced
The problem I face is that /screen(72dpi) is too low quality and /ebook(150dpi) is to heavy. I'm ...
3
votes
1
answer
306
views
ghostscript does not displaying my .ps file
I am sorry for what I imagine is an annoyingly trivial question -- I am technologically challenged. I was trying to learn a bit of postscript (to draw some fun fractals) but unfortunately, I am stuck ...