ghostscript

Ghostscript: adding BleedBox

旧街凉风 提交于 2019-12-06 13:47:39
I have a pdf with such pdfInfo: pdfinfo -f 1 -l 1 -box book.pdf Title: Hibaby book Author: Hibaby.biz Creator: HIBABY Producer: TCPDF 5.9.193 (http://www.tcpdf.org) CreationDate: Tue Mar 5 17:25:23 2013 ModDate: Tue Mar 5 17:25:23 2013 Tagged: no Form: none Pages: 21 Encrypted: no Page 1 size: 595.276 x 841.89 pts (A4) Page 1 rot: 0 Page 1 MediaBox: 0.00 0.00 595.28 841.89 Page 1 CropBox: 0.00 0.00 595.28 841.89 Page 1 BleedBox: 0.00 0.00 595.28 841.89 Page 1 TrimBox: 0.00 0.00 595.28 841.89 Page 1 ArtBox: 0.00 0.00 595.28 841.89 File size: 3771955 bytes Optimized: no PDF version: 1.7

Using ghostscript as x11 viewer (gs x11 viewport positioning)?

房东的猫 提交于 2019-12-06 12:35:51
问题 I already know about Ghostscript front end viewers; but I was wondering how gs itself could be used for viewing PDF documents? The closest I could get to, is to specify explicitly x11 window as output device, specify width and height of the window via -g , and specify rasterization resolution via -r ; or, a command line like this: gs -sDevice=x11 -g500x500 -r150x150 -dFirstPage=3 fontspec.pdf ... which results with something like: ... which is, in fact, all good - except, it starts at lower

Dynamically generated PDF files working in most readers except Adobe Reader

China☆狼群 提交于 2019-12-06 12:35:21
I'm trying to dynamically generate PDFs from user input, where I basically print the user input and overlay it on an existing PDF that I did not create. It works, with one major exception. Adobe Reader doesn't read it properly, on Windows or on Linux. QuickOffice on my phone doesn't read it either. So I thought I'd trace the path of me creating the files - 1 - Original PDF of background PDF 1.2 made with Adobe Distiller with the LZW encoding. I didn't make this. 2 - PDF of background PDF 1.4 made with Ghostscript. I used pdf2ps then ps2pdf on the above to strip LZW so that the reportlab and

add text on 1st page of a pdf file

懵懂的女人 提交于 2019-12-06 12:26:05
I'm tryin to add a text comment (not a note) to a pdf file. I create a date.ps file with contains the text comment : %! /Arial findfont 30 scalefont setfont newpath 10 720 moveto (PAID on 5.1.2013) show showpage and I launch the shell command with $i=name of the pdf file to tag: gs -q -dNOPAUSE -dSAFER -dBATCH -sOutputFile=$RFP/$DOMAINE/$NEWNAME -sDEVICE=pdfwrite -sPAPERSIZE=a4 date.ps $i This works, but it create a new 1st page empty with the text "PAID on 5.1.2013" alone. I do not find the trick to overlay the text on the 1st page of the original pdf. Can you help me pls Because your

How to resize an EPS file with free software or command line utility

£可爱£侵袭症+ 提交于 2019-12-06 12:14:56
问题 I use Matlab to generate EPS (Encapsulated PostScript) files. I would like to resize these files so they render at a different size than they are generated. I would like to specify the resized dimensions in inches or centimeters, ideally. Is there an option for doing this using free software or a command line utility? I am looking for something compatible with OSX, but would settle for Windows. I am aware of EPSViewer.org but it only works in pixels and constrains the dimensions to be

Thumbnail generation with Ghostscript rotates my device size definition for landscape pdf pages

三世轮回 提交于 2019-12-06 11:22:12
I want to use GS to generate thumbnails from pdf files. The thumbnail must fit a 90x120 pixel rectangle The image should not be rotated The image should be resized to fit the rectangle with keeping aspect ratio I use the following command: gswin32 -dPDFFitPage -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 -dDEVICEWIDTH=90 -dDEVICEHEIGHT=120 -dORIENT1=true -sDEVICE=jpeg -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sOutputFile=output.%d.jpg input.pdf Result: If I use some PDF with portrait pages like this example , which you can download, then the

Dynamically change print data

假如想象 提交于 2019-12-06 11:14:18
I am looking into a way to manipulate the data sent to a printer (inkjet for now. Probably an HP 2460). I want to change the data dynamically each time the printer tries to print. Ie. at point 1, the print will be of the page kept normally, but the paper might change its position, so I am looking for a way to rotate the input image to counter the rotation of the paper. I think I am looking for a way to specify the data to be printed pixel by pixel in real time. Data input available : rotation position of the print head with respect to the corner of the page at each instant provided in real

Convert PDF files to PDF/A via Ghostscript

烂漫一生 提交于 2019-12-06 09:32:12
问题 I'd like to convert arbitrary PDF files to PDF/A with Ghostscript 9.15. Is Ghostscript able to create PDF/A-3b conformant PDFs? There is no parameter which represents a PDF/A conformance level, so I assume there is no possibility. Or is there anything I have overlooked? I was following a blog post where a Windows batch file is used to convert from PDF to PDF/A (see http://www.mcbsys.com/techblog/2013/04/batch-convert-pdf-to-pdfa/). The gs invokation in the batch is: "%gs_path%\gswin64c" ^

How to set the physical size of PDF pages with Ghostscript?

送分小仙女□ 提交于 2019-12-06 08:55:38
问题 I want to convert a bunch of .eps images to a single PDF using Ghostscript. But when I look at the PDF file in a PDF viewer and set view to 100% to physical size of the file is huge! I would like to force gs to create the PDF in letter size, but everything I tried failed. Here's the command I'm using: gs -dBATCH -dNOPAUSE -dEPSFitPage -dEPSCrop \ -q -sDEVICE=pdfwrite -sOutputFile=out.pdf \ file1.eps file2.eps All my attempts with -sPAPERSIZE=legal and -dDEVICEWIDTHPOINTS=w

Unable to load library 'gs' with Ghost4J

我是研究僧i 提交于 2019-12-06 08:11:44
I am trying to use Ghost4J in order to turn a PDF into a PNG. I am aware that people have asked this before, but not with OS X 10 and with the latest release of Ghost4J. I have followed the instructions listed in zippy1978's answer from here: PDF to image using Java I have followed everything from the Ghost4J page I also have tried both answers from here: How can i use ghost4j on OS X 10.9 And I have installed Ghostscript with Port and have tried from Richard Koch's website . I continue to get this error: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception