ghostscript

Importing Ghostscript in Python on Windows 8

天涯浪子 提交于 2021-02-19 01:45:07
问题 I've been trying to import ghostscript into Python in order to convert pdf files to a .tiff format. I am using Python version 2.7.10 on Windows 8. I have successfully downloaded and installed ghostscript using pip, and it appears in the correct location (...\Anaconda\Lib\sitepackages). I've confirmed that other packages located in this directory can be imported into Python. I am using the command import ghostscript When I do so, I get an error message: RuntimeError: Can not find Ghostscript

GraphicsMagic is unable to identify background transparency of PDF

和自甴很熟 提交于 2021-02-18 18:54:59
问题 GM is unable to identify background transparency of PDF and PNG created using "gm convert" gets white background while same PDF is converted to PNG with transparent background by IM. $convert -verbose /var/tmp/abc.pdf /var/tmp/abc.png /var/tmp/magick-16370Tq7WYv5U54Pa1 PNG 288x720 288x720+0+0 8-bit sRGB 20.7KB 0.000u 0:00.009 /var/tmp/abc.pdf PDF 288x720 288x720+0+0 16-bit sRGB 20.7KB 0.000u 0:00.000 /var/tmp/abc.pdf=>/var/tmp/abc.png PDF 288x720 288x720+0+0 8-bit sRGB 17c 16.6KB 0.010u 0:00

GraphicsMagic is unable to identify background transparency of PDF

时间秒杀一切 提交于 2021-02-18 18:54:36
问题 GM is unable to identify background transparency of PDF and PNG created using "gm convert" gets white background while same PDF is converted to PNG with transparent background by IM. $convert -verbose /var/tmp/abc.pdf /var/tmp/abc.png /var/tmp/magick-16370Tq7WYv5U54Pa1 PNG 288x720 288x720+0+0 8-bit sRGB 20.7KB 0.000u 0:00.009 /var/tmp/abc.pdf PDF 288x720 288x720+0+0 16-bit sRGB 20.7KB 0.000u 0:00.000 /var/tmp/abc.pdf=>/var/tmp/abc.png PDF 288x720 288x720+0+0 8-bit sRGB 17c 16.6KB 0.010u 0:00

Linux 下的字体

可紊 提交于 2021-02-12 09:35:19
有 serif 用的最多的是 Time New Roma,不过,那是在windows 下面 在Linux 下面是Nimbus Roman, 在后面的ubuntu 中替换成了 Liberation Serif From Wikipedia: Nimbus Roman is a serif typeface created by URW Studio in 1982. Nimbus Roman No 9 L is a serif typeface created by URW Studio in 1987, and eventually released under the GPL and AFPL (as Type 1 font for Ghostscript) in 1996 and LPPL in 2009. It features Normal, Bold, Italic, and Bold Italic weights, and is one of several freely licensed fonts offered by URW++. Although the characters are not exactly the same, Nimbus Roman No 9 L has metrics almost identical to Times and Times

How to change the width of lines in a PDF/PostScript file

笑着哭i 提交于 2021-02-11 13:29:00
问题 I regularly need to handle technical drawings (mechanical engineering) and they often come with colored lines, which can't be printed properly. Therefore I wrote the batch script listed below. It uses ghostscript to convert drawings to black & white; note that greyscales aren't sufficient, as they might be barely visible on a laser print. The batch script even handles multiple files dragged and dropped on it. Now I encounter a large bunch of drawings which appear to have linewidths of

Convert list of jpgs to pdf with ghostscript

旧城冷巷雨未停 提交于 2021-02-11 12:54:24
问题 GhostScript v9.10 64bit version I'd like to take a list of jpgs and turn them into a single pdf file where each image has its own page. I tried to follow the method used here: Using Ghostscript to convert JPEG to PDF but I'm getting errors. Here is my command: C:\Temp>gswin64c -sDEVICE=pdfwrite -o cafb0173-f4be-47a8-a39e-f479ca0a4d09.pdf viewjpeg.ps -c 5c520934-461a-44f3-9f00-9fdc9fe666c1.jpg Here is what I get: GPL Ghostscript 9.10 (2013-08-30) Copyright (C) 2013 Artifex Software, Inc. All

GhostScript, How to set custom page size using command line?

萝らか妹 提交于 2021-02-11 01:16:16
问题 I know that have a simillar question : How to change Ghostscript output file (in printer spooler) but the answers was not helpful I using the command : -q -dBATCH -dNOPAUSE -dNODISPLAY -c "mark /NoCancel true /OutputFile (%printer%Ricoh c2051) /UserSettings << /DocumentName (Test) /MaxResolution 600 >> (mswinpr2) finddevice putdeviceprops setdevice" -f "C:\duplex.pdf" to set a custom name for document, but if a try to use "-sPAPERSIZE=a4" still the outputpaper size is "LETTER". then,how to

Add Duplex option for certain pages in postscript file using ghostscript

不羁岁月 提交于 2021-02-10 13:00:07
问题 I have a pdf file with 3 pages. I want to print first page as simplex and second & third page as duplex(double-sided - second on the front, third on the back). How can I generate the required postscript with ghostscript. I found the below solution on the internet and it works, but it makes the whole document as duplex. gswin64c.exe -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=ps2write -sOutputFile=output.ps -c "<</PSDocOptions (<</Duplex true>> setpagedevice)>> setdistillerparams" -f input.pdf Above

Where to get a thread-safe Ghostscript compilation?

折月煮酒 提交于 2021-02-08 04:11:55
问题 The new version of Ghostscript (9.07) has a threading support (can be thread-safe), but it says that the code must be compiled with a special flag to enable this. How do I do this? Or where can I get already built thread-safe version? I tried to download the source, opened in VS, but it failed to build. So maybe somebody has already done this and could share the DLL. 回答1: Are you interested in the thread safe version of Ghostscript, or multiple rendering threads? Multiple rendering threads

Where to get a thread-safe Ghostscript compilation?

寵の児 提交于 2021-02-08 04:10:46
问题 The new version of Ghostscript (9.07) has a threading support (can be thread-safe), but it says that the code must be compiled with a special flag to enable this. How do I do this? Or where can I get already built thread-safe version? I tried to download the source, opened in VS, but it failed to build. So maybe somebody has already done this and could share the DLL. 回答1: Are you interested in the thread safe version of Ghostscript, or multiple rendering threads? Multiple rendering threads