ghostscript

Ghostscript clips a pdf file

那年仲夏 提交于 2019-12-11 05:56:48
问题 I'm trying to print a pdf with Ghostscript using those settings : var switches = new List<string> { @"-empty", @"-dPrinted", @"-dNOPAUSE", @"-dNOSAFER", @"-dQUIET", @"-dPDFSETTINGS=/printer", @"-dNumCopies=1", @"-sDEVICE=mswinpr2", @"-dCompatibilityLevel=1.4", @"-sOutputFile=%printer%" + printerSettings.PrinterName, @"-f", pdfFileName }; but either the pdf or Ghostscript have bad margins and while it's good when I print it to file it clips when I print it on my printer. Is there any way to

Error with ImageMagick and Ghostscript converting from PDF

一个人想着一个人 提交于 2019-12-11 05:19:17
问题 We are using Magick.Net version 7.0 with Ghostscript 9.16. We are reading in a PDF and converting this to a tif or a jpg image. Everything is working fine when we run these through one at a time and our PDF gets converted. This is an application that will be hit by many systems, so we put a small load test to ensure we could handle multiple requests. Everything runs great as long as we use different PDF files. If we try and run the same PDF file through multiple times (doing 5 requests at the

Using GhostScript 9.10 in Windows with Unicode characters in parameters

江枫思渺然 提交于 2019-12-11 04:00:52
问题 I want to use Ghostscript in a .NET / C# application to convert a .tiff file to PDF. My problem: When the file path contains non-ansi characters (e.g. Umlaute), the function gsapi_init_with_args fails. (With GS 8.x, it works fine!). I found information that the behaviour was changed in 9.x, and I also found a function called gsapi_init_with_argsW And this function should work with .NET without any problems (see http://permalink.gmane.org/gmane.comp.printing.ghostscript.cvs/31721) So I use the

How to read the property or color information of EPS using c#?

旧巷老猫 提交于 2019-12-11 03:48:28
问题 My requirement is to read the 50 more EPS files and export the property/color mode of the EPS, is this possible? the color modes are Gray-scale, RGB and CMYK. So far I tried the BitmapImage to read the EPS but I am NOT getting the luck. the BitmapImage does not read the EPS because it is vector format (I read somewhere in stack-overflow). Can any one helps me out to read the EPS file and display the format of image i.e., color of image? I tried some code please be gentle I am beginner to the

How to crop pdf using Ghostscript (without entering manually Bounding Box)

烈酒焚心 提交于 2019-12-11 02:56:48
问题 I need to crop a pdf-file to its Bounding Box. First I calculate actual Bounding Box: gswin64c.exe ^ -o nul ^ -sDEVICE=bbox ^ input.pdf the result %% HiResBoundingBox: 156.350019 391.521011 445.919963 446.259010 I substitute into the gswin64c.exe ^ -o output.pdf ^ -sDEVICE=pdfwrite ^ -dUseCropBox=true ^ -c "[/CropBox [156.350019 391.521011 445.919963 446.259010] /PAGES pdfmark" ^ -f input.pdf is there a way to substitute the Bounding Box automatically? thank you. 回答1: What you need is called

Best way to produce 'colour correct' raster from a PDF or PS with ghostscript

故事扮演 提交于 2019-12-11 02:47:10
问题 What is the best way to produce colour correct raster files with ghostscript? The various ways that ColorConversionStrategy, UseCIEColour and ICC profiles interact is not that obvious, and its quite easy to produce images that are way off in terms of colour. So far the below command is the best that I've managed, but its still produces slightly different hues for our test files when compared against previewing in Acrobat Pro and I'm wondering if anyone has a more 'scientific' answer. Cheers!

phantom axis in eps images despite having set invisible axis in matplotlib

旧街凉风 提交于 2019-12-11 02:42:59
问题 I managed to put those line in my matplotlib code ax.spines['top'].set_visible(False) ax.spines['right'].set_visible(False) ax.spines['left'].set_visible(False) in hopes of hiding the top, right, and left axes in the saved images. They worked fine in png images, but in the saved eps files, there are still boundaries (not sure whether they are axes) on the left and the top (the right axis indeed disappeared). any ideas on how to hide the axis/frame boundaries when saving as eps images? BTW: I

Ghostscript.NET Multithreading Issue

南笙酒味 提交于 2019-12-10 23:07:51
问题 The longest part of a monthly process we run is the automated slicing and conversion of some PDFs to images. Each PDF is read in, converted to 3 different PDFs, and those 3 are converted to images to be placed in e-mails to customers. The PDFs are unique per-customer, and we send a monthly PDF to at least 15,000 (frequently more like 22k) customers. Our PDF generation and slicing is already multithreaded, but I've been looking into parallelizing the remaining bits of it. To that end, I have

ghostscript not working in php

帅比萌擦擦* 提交于 2019-12-10 22:38:38
问题 I want to create php page which convert first page of pdf file to jpg image. I have these code. exec('convert -density 300 "24.pdf"[0] "24-1.jpg"', $output); print_r(array_values($output)); It not work. I have tested following code(with command prompt and php) and it works well. Exec('DIR', $output); print_r(array_values($output)); //to check command Exec('convert', $output); print_r(array_values($output)); //to check imageMagick Exec('convert -transverse 22.jpg 22-1.jpg', $output); print_r

python ghostscript not closing output file

瘦欲@ 提交于 2019-12-10 20:26:36
问题 I'm trying to turn PDF files with one or many pages into images for each page. This is very much like the question found here. In fact, I'm trying to use the code from @Idan Yacobi in that post to accomplish this. His code looks like this: import ghostscript def pdf2jpeg(pdf_input_path, jpeg_output_path): args = ["pdf2jpeg", # actual value doesn't matter "-dNOPAUSE", "-sDEVICE=jpeg", "-r144", "-sOutputFile=" + jpeg_output_path, pdf_input_path] ghostscript.Ghostscript(*args) When I run the