ghostscript

How can I remove all images from a PDF?

耗尽温柔 提交于 2019-11-26 12:42:51
问题 I want to remove all images from a PDF file. The page layouts should not change. All images should be replaced by empty space. How can this be achieved with the help of Ghostscript and the appropriate PostScript code? 回答1: Meanwhile the latest Ghostscript releases have a much nicer and easier to use method of removing all images from a PDF. The parameter to add to the command line is -dFILTERIMAGE gs -o noimages.pdf -sDEVICE=pdfwrite -dFILTERIMAGE input.pdf Even better, you can also remove

How to use ghostscript to convert PDF to PDF/A or PDF/X?

北战南征 提交于 2019-11-26 12:38:52
问题 Is there a way to use ghostscript to convert PDF to PDF/A or PDF/X? I know it can be used to convert PDF to images, but I don\'t know if it can be used to convert PDF/A. What parameters should I use? 回答1: This is to convert a pdf document (not pdf/a) into pdf/a: gs -dPDFA -dBATCH -dNOPAUSE -dUseCIEColor -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite -sPDFACompatibilityPolicy=1 -sOutputFile=output_filename.pdf input_filename.pdf Hope this will help some one! 回答2: Hope this answer helps

How to extract text from a PDF? [closed]

风格不统一 提交于 2019-11-26 09:15:02
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Can anyone recommend a library/API for extracting the text and images from a PDF? We need to be able to get at text that is contained in pre-known regions of the document, so the API will need to give us positional information of each element on the page. We would like that data to be output in xml or json

How to print PDF on default network printer using GhostScript (gswin32c.exe) shell command

橙三吉。 提交于 2019-11-26 08:09:51
问题 I\'d like to print PDF file(s) on windows\' network printer via GhostScript. (I dont want to use Adobe Reader) I\'ve read gswin32c.exe which can do the job. I experimented with many commands and coudn\'t find the way how to force gs to print PDF on my (windows default) network drive. I don\'t need point exact network printer- default can be used. But if there is no such option I\'m happy to pass printer name as well. (I\'ve tried with param -SDevice=\"\\server_IP\\printer_name\" but this

Cropping a PDF using Ghostscript 9.01

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 03:07:04
问题 I am not a programmer, but would like to learn how to crop a PDF using Ghostscript. I have installed Ghostscript 9.01 in my machine. Please guide me step by step process (starting from invoking Ghostscript) to crop a PDF with the specific coordinates. I am even new to Ghostscript. 回答1: First, take note that the measurement unit for PDF is the same as for PostScript: it's called a point [pt]. 72 points == 1 inch == 25.4 millimeters Assuming you have a page size of A4. Then the media dimensions