ghostscript

Ghostscript ps to jpg output without white space

一个人想着一个人 提交于 2019-12-06 07:42:04
What I am trying to do is convert a ps which is just a image to a jpg using ghostcript here is what I started with gswin32c.exe -sDEVICE=jpeg -sOutputFile="test.png" example.ps however when I run this the jpg comes out with a lot of white space to the right and the bottom Also the picture comes out huge is there any way to crop out the whitespace in ghostscript? I tried this code gswin32c.exe -sDEVICE=jpeg -dBATCH -dNOPAUSE -dSAFER -r72x72 -g200x900 -sOutputFile="test.jpg" example.ps which decrease the width but the height is still huge. Any solutions? Firstly you need to set the 'correct'

Ghostscript 9.07 : PDF/X-1a:2001 : PDF/X output intent is missing

一世执手 提交于 2019-12-06 07:41:53
Could you please tell me how to embedded the PDF/X output intent. When I check with preflight I reported that PDF/X-1a:2001 : PDF/X output intent is missing in the PDF file. Problem faced in the PDF file: 1) PDF/X-1a:2001 : PDF/X version is not PDF/X-1a:2001 2) PDF/X-1a:2001 : PDF/X output intent is missing 3) PDF/X-1a:2001 : Document trapped flag is Unknown 4) PDF/X-1a:2001 : Text object uses invalid characters (.notdef glyphs) GS Command: gs -dPDFX -dBATCH -dNOPAUSE -dNOOUTERSAVE \ -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite \ -sOutputFile=GS_Test.pdf PDFA_def.ps Test.ps PDFA_def.ps : %

Rasterize PDF's with font not embedded using GhostScript

a 夏天 提交于 2019-12-06 07:32:24
问题 I need to generate JPEG's from PDF. JPEG must be created based on Trim Box and PDF's can be version 1.3 with extra Pantone colors that absolutely require Overprint Preview so only GhostScript (and Rip's of course can handle them). Both Photoshop, Image Magick and SIPS (Scriptable Image Processing System of OS X) cannot solve both problems (Crop to trim and composite handling overprint). I created an app to rasterize the PDF I receive and all works good EXCEPT that some chinese PDF have one

PDF-Print from C#-Program with Ghostscript on specific tray

微笑、不失礼 提交于 2019-12-06 07:29:22
问题 in my current software I'm creating pdf-files and printing them out with ghostscript like this: ... string[] printParams = new string[] { "-q", "-sDEVICE=mswinpr2", "-sPAPERSIZE=a4", "-dNOPAUSE", "-dNoCancel", "-dBATCH", "-dDuplex", string.Format(@"-sOutputFile=""\\spool\{0}""", printerName), string.Format(@"""{0}""", filename) ... var p = new Process(); p.StartInfo.FileName = this.ghostScriptExePath; p.StartInfo.Arguments = string.Join(" ", printParams); p.StartInfo.WindowStyle =

Can't install GhostScript in ImageMagick

走远了吗. 提交于 2019-12-06 06:46:18
Download latest version of ImageMagick. Unpacked it. Installing Ghostscript like this: $ sudo apt-get install ghostscript After that try to configure ImageMagick: $ ./configure --with-gslib $ make $ make install After that i try to conver PDF to jpg $ sudo /usr/local/bin/convert in.pdf out.jpg And i see this mistake convert: no decode delegate for this image format `/tmp/magick-BzHdr4Kp-00000001' @ error/constitute.c/ReadImage/544. convert: Postscript delegate failed `in.PDF': Нет такого файла или каталога @ error/pdf.c/ReadPDFImage/678. convert: no images defined `out.jpg' @ error/convert.c

Python <No such file or directory: 'gs'> error even with GhostScript installed on Macintosh *Issue still Persisting!*

只愿长相守 提交于 2019-12-06 06:00:36
问题 I have implemented the following save function in my program which allows the user to save as a JPEG file whatever he/she draws on the Tkinter canvas with the Turtle. How it is supposed to work is that it first captures the screen and Tkinter canvas and then creates a postscript file based on it. Then it converts that postscript file as a PIL (Python Imaging Library) readable file type, and then the PIL saves the converted file as a JPEG. My save function is shown below: def savefirst(): #

Using Ghostscript in a Webapplication (PDF Thumbnails)

百般思念 提交于 2019-12-06 05:06:00
i am using the ghostscriptsharp wrapper for c# and ghostscript. I want to generate thumbnails out of pdf-files. Further Information on the sample-code are given here . There are different Methods imported form the ghostscript-c-dll "gsdll32.dll". [DllImport("gsdll32.dll", EntryPoint = "gsapi_new_instance")] private static extern int CreateAPIInstance(out IntPtr pinstance, IntPtr caller_handle); [DllImport("gsdll32.dll", EntryPoint = "gsapi_init_with_args")] private static extern int InitAPI(IntPtr instance, int argc, IntPtr argv); //...and so on I am using the GhostscriptWrapper for generating

c# PDF to Bmp for free

岁酱吖の 提交于 2019-12-06 03:48:11
I am writing a program that uses OCR (tessnet2) to scan an image file and extract certain information. This was easy before I found out that I was going to be scanning attachments of PDFs from an Exchange server. The first problem I am working on is how to convert my PDFs to BMP files. From what I can tell so far of TessNet2, it can only read in image files - specifically BMP. So I am now tasked with converting a PDF of indeterminate size (2 - 15 pages) to BMP image. After that is done I can easily scan each image using the code I have built already with TessNet2. I have seen things using

How to stitch two PDF pages together as one big page?

送分小仙女□ 提交于 2019-12-06 02:49:55
I have two 36" by 48" posters (LaTeX) that I want to append into a single 72" by 48" poster (stack vertically). Browsing around SO and GS documentation, I have no clue (I'm not a CLI wizard). How can I do this? (Also, the process should not compress the raster images lossily, because this will be printed 2400*1200 DPI.) Since the OP didn't provide (a link to) the original input posters, this answer will proceed in three steps: Create 2 dummy posters as input for step 3 Create a LaTeX document which embeds the 2 dummy posters Run pdflatex to create a PDF from the LaTeX document in step 2 Step 1

Convert PDF to CMYK but ignore black?

荒凉一梦 提交于 2019-12-05 21:28:31
I am converting an RGB PDF to CMYK using the following command: /usr/local/bin/gs -dSAFER -dBATCH -dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite \ -sColorConversionStrategy=CMYK -sColorConversionStrategyForImages=CMYK \ -dProcessColorModel=/DeviceCMYK -dEncodeColorImages=false \ -dEncodeGrayImages=false -dEncodeMonoImages=false -sOutputFile=CMYK.PDF RGB.PDF The resulting file is 100% CMYK, however anything that was 100% black in the RGB PDF is now: C: 72% M: 68% Y: 67% K: 89% The result is that black is a slightly dark grey when really it should be black. Is there anything I need to add to this command