ghostscript

How can I extract color values from an EPS file?

大城市里の小女人 提交于 2019-12-01 13:40:17
I'm trying to find all fill and stroke values used in an EPS file. I can parse the file, I just can't figure out how color values are defined in the EPS postscript section. I have converted the file to SVG (using ghostscript) and I can get the hex values, but an EPS to SVG conversion with a gradient produces files 20x the size. Is there a standard format for color values in postscript that I can extract from an EPS file? KenS PostScript is a programming language, not a simple file format, so there is no simple way to determine what is going on in the program. A gradient may well be defined as

Ghost4J. java.lang.UnsatisfiedLinkError: Unable to load library 'gsdll64'

风格不统一 提交于 2019-12-01 12:50:27
问题 I included Ghost4J 0.45 into my project using Maven and installed Ghostscript into C:\Program Files\gs\gs9.06 . But I still get an error java.lang.UnsatisfiedLinkError: Unable to load library 'gsdll64' . I added into PATH env variable directory where located 'gsdll64.dll' (i.e. C:\Program Files\gs\gs9.06 ). Also tried launch application using -Djava.library.path=/path/to/dir . But I alwways get UnsatisfiedLinkError (but when I launch using JVM argument -Djava.library.path I get ClassNotFound

Can Ghostscript currently convert a PDF to PDF/X?

倾然丶 夕夏残阳落幕 提交于 2019-12-01 12:29:30
The print house requires my dissertation's PDF to be compliant with PDF/X1a:2001. The content file was compiled using XeTeX LaTeX and the second PDF is the cover design done with Inkscape 0.48 . The nearest answer I found in this post: https://stackoverflow.com/a/3483801/1288722 , and if I rightly understood, this can be done at least to convert the PDF to PDF/X using Ghostscript . As stated in the answer above, conversion to PDF/X requires a valid ICC profile. I contacted the printing house and they provided a file of their preferred one which is: ISOcoated_v2_300_eci.icc . I added the .icc

Resize A4 PDF to SRA4 and center content

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 11:06:51
I'd like to be able to resize an A4 PDF to the slightly bigger SRA4 format, used by printing professionals. The content shouldn't be resized, but only centered. In other words, I'd like to add margins to my A4 document. I managed more or less to do that with this Ghostscript (9.05) call: gs -dPDFSETTINGS=/default -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf -dDEVICEWIDTHPOINTS=637 -dDEVICEHEIGHTPOINTS=907 -dFIXEDMEDIA in.pdf The problem is that the A4 content is not centered in the SRA4 page, but is placed at the bottom left corner. Any idea how to center the content? plang I

How do I resize a PDF to be exactly 8.5 x 11 inches using Ghostscript?

ぐ巨炮叔叔 提交于 2019-12-01 09:21:50
Consider this PDF . I am trying to convert it to standard letter size (8.5 x 11) using the following command. gs -dFIXEDMEDIA -dBATCH -dNOPAUSE -sPAPERSIZE=letter \ -dPDFFitPage -q -sDEVICE=pdfwrite -sOutputFile=out.pdf \ dean08mapreduce.pdf Here is pdfinfo on the output. Producer: GPL Ghostscript 9.10 CreationDate: Mon Nov 17 18:25:01 2014 ModDate: Mon Nov 17 18:25:01 2014 Tagged: no Form: none Pages: 7 Encrypted: no Page size: 596.225 x 792 pts Page rot: 0 File size: 126908 bytes Optimized: no PDF version: 1.4 Here is pdfinfo on the original: Producer: Creo Normalizer JTP CreationDate: Fri

How do I resize a PDF to be exactly 8.5 x 11 inches using Ghostscript?

和自甴很熟 提交于 2019-12-01 06:59:55
问题 Consider this PDF. I am trying to convert it to standard letter size (8.5 x 11) using the following command. gs -dFIXEDMEDIA -dBATCH -dNOPAUSE -sPAPERSIZE=letter \ -dPDFFitPage -q -sDEVICE=pdfwrite -sOutputFile=out.pdf \ dean08mapreduce.pdf Here is pdfinfo on the output. Producer: GPL Ghostscript 9.10 CreationDate: Mon Nov 17 18:25:01 2014 ModDate: Mon Nov 17 18:25:01 2014 Tagged: no Form: none Pages: 7 Encrypted: no Page size: 596.225 x 792 pts Page rot: 0 File size: 126908 bytes Optimized:

Unable to load library 'gs': libgs.so: cannot open shared object file: No such file or directory

半城伤御伤魂 提交于 2019-12-01 00:59:32
I have installed ghostscript of 64 bit on my 64 bit linux machine. I am using ghost4j-0.5.0.jar to convert pdf files to tiff files. I have written a java program which will convert pdf files to tiff files. This is working perfectly fine on Windows but when i thought of moving this to linux machine i am getting the below error. "Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'gs': libgs.so: cannot open shared object file: No such file or directory" I checked lib folder and could not find libgs.so file in the lib folder. I am not sure where to get that file.

Splitting single page into two pages with ghostscript

蓝咒 提交于 2019-11-30 23:58:30
I have a pdf with something like presentations slides and multiple slides per page. How can I use ghostscript to split the file so that there is one slide per page? A long time ago I wrote some code for someone on comp.lang.postscript to do this, again it was for PowerPoint slides. This PostScript code assumes that all the 'subpages' (ie slides) are the same size and location on the PDF page and that all the PDF pages are the same size. Save the following as a file called pdf_slice.ps and follow the usage as described in the comments. %!PS % Copyright (C) 2011 Artifex Software, Inc. All rights

ghostscript 9.26 update breaks imagick readImage for multipage PDF

柔情痞子 提交于 2019-11-30 23:42:06
Since the ghostscript update 9.25 -> 9.26 (on debian) last morning we get this error: ErrorMessage: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r300x300' -dFirstPage=1 -dLastPage=1 '-sOutputFile=/tmp/magick-39903EapVvuyNQxL4%d' '-f/tmp/magick-39903VD0GMIpLPaIN' '-f/tmp/magick-399031owlSOb4aOEw'' (-1) @ error/delegate.c/ExternalDelegateCommand/462 When trying to read the first page of a multipage PDF: $this->resource = new \Imagick();

Printing PDF using GhostScript.NET DPI printing issue

北战南征 提交于 2019-11-30 20:59:12
问题 I am using GhostScript.NET to print a PDF. When I print it at 96DPI, the PDF prints fine, but is a little blurry. If I try to print the document at 600DPI, the page that prints extremely magnified. using GhostScript.NET.Rasterizer; using System.Drawing.Printing; PrintDocument doc = new PrintDocument(); doc.PrinterSettings.PrinterName="<printer name>"; doc.PrinterSettings.Copies=(short)1; GhostScriptRasterizer rasterizer = new GhostScriptRasterizer(); rasterizer.Open("abc.pdf"); //Image page =