ghostscript

Ghostscript not writable

本小妞迷上赌 提交于 2019-12-08 18:08:18
问题 Trying to install octave on a new Macbook, but keep running into problems using Homebrew. I am following directions here: http://wiki.octave.org/Octave_for_MacOS_X I run into the error: Linking /usr/local/Cellar/ghostscript/9.14... Error: Could not symlink share/ghostscript/Resource /usr/local/share/ghostscript is not writable. After entering: sudo chown -R username:admin /usr/local/bin brew link ghostscript I still get the same error. How do I make ghostscript writable? 回答1: Using this

Ghost4J native library to convert pdf to image

删除回忆录丶 提交于 2019-12-08 13:35:11
问题 I am using Ghost4J Native library 32bit and 64bit dll files to convert my PDF to images. I need to use it with ThreadPoolExecutor i.e. multithreaded, but since its native, it crashes my JBoss too often. After I synchronize the use of this library, The threads do not perform well. i.e. with 4 threads, and with 8 threads, its no difference in performance. Is there any safe way of doing this? 回答1: Have you tried what the ghost4j people recommend for multi-threading: Multi-threading Making sure

Ghostscript convert PDF to JPG (CMYK profile) resolution error

大兔子大兔子 提交于 2019-12-08 13:11:32
I'm using Ghostcript to convert some PDF files to JPG. All is working when converting the program consider the resolution of 600dpi when converting and output jpeg quality is good. Here is my code : gs -sDEVICE=jpegcmyk -dTextAlphaBits=4 -r600 -dSAFER -dBATCH -dNOPAUSE -o my_output_file.jpg my_input_file.pdf But when I open the file in Photoshop, the properties contains 72dpi instead of 600dpi I expected : When I try with RGB profile for output, it is ok, I have got 600dpi. So what I want is CMYK + 600dpi in image properties. As can be seen from your screenshots, both images are of the same

PDF to PNG with high resolution

佐手、 提交于 2019-12-08 12:56:31
问题 I want to convert a PDF file to PNG, I want the output to be 595*842 with high resolution, I used this command: gswin64.exe -q -sDEVICE=png16m -dSAFER -dMaxBitmap=1000000000 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dPDFFitPage=true -sDEVICE=pngalpha -dBATCH -dNOPAUSE -sOutputFile=C:\cover.png C:\cover.pdf I know that I can use -r300 but it will change the dimension to 2479*3509 also, I've tried -sPAPERSIZE=a4 + -r300 which didn't work. How can I have the output in 595x842 with high resolution

Ghostscript convert PDF to JPG (CMYK profile) resolution error

坚强是说给别人听的谎言 提交于 2019-12-08 07:31:19
问题 I'm using Ghostcript to convert some PDF files to JPG. All is working when converting the program consider the resolution of 600dpi when converting and output jpeg quality is good. Here is my code : gs -sDEVICE=jpegcmyk -dTextAlphaBits=4 -r600 -dSAFER -dBATCH -dNOPAUSE -o my_output_file.jpg my_input_file.pdf But when I open the file in Photoshop, the properties contains 72dpi instead of 600dpi I expected : When I try with RGB profile for output, it is ok, I have got 600dpi. So what I want is

Ghostscript PDF to PDF/A conversion font issues

本小妞迷上赌 提交于 2019-12-08 06:51:05
问题 I am exploring tools to convert PDF documents to PDF/A. Ghostscript seems to give out of the box support for such a conversion. One issue seems to be that some true type fonts that are a part of the original PDF document are not converted correctly. If I copy a text from the converted PDF/A document, and paste it in notepad, the copied text appears to be garbled text. The original document text can be copied to notepad just fine. I am using the following script: gswin64 -dPDFA -dBATCH

Extract a bitmap from PostScript

时间秒杀一切 提交于 2019-12-08 06:08:47
问题 I need to extract a bitmap from a PostScript file (.ppf). It is compressed with RLE and encoded with ASCIIHexEncode. I will call it from PHP. I wonder if there is an elegant way to do that. I don't want to reinvent wheel, but I would like to use existing libraries. Is there a way how to call compression filters from PostScript, Ghostscript or imagick? 回答1: You can write a PostScript program to run compression/decompression filters on input. So, if you have the bitmap data already extracted in

Dynamically generated PDF files working in most readers except Adobe Reader

馋奶兔 提交于 2019-12-08 03:31:00
问题 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

Using Ghostscript in a Webapplication (PDF Thumbnails)

这一生的挚爱 提交于 2019-12-08 03:02:29
问题 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

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

家住魔仙堡 提交于 2019-12-07 15:24:30
问题 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.) 回答1: 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