ghostscript

gGt an output file with a count of PDF pages for each file with Ghostscript

♀尐吖头ヾ 提交于 2020-07-07 05:45:50
问题 This code works for me, except all my files are on a network drive. In the example below, the code works only if the file is in the root directory ( c:\ ) as an example. Do I have to replace input.pdf with something like d:\hello space folder\filefolder\input.pdf ? I tried this, but got a sleuth of errors saying directory not found. I tried to do netuse and map the network main drive folder, but that didn't work either. gswin32c ^ -q ^ -dNODISPLAY ^ -c "(input.pdf) (r) file runpdfbegin

gGt an output file with a count of PDF pages for each file with Ghostscript

丶灬走出姿态 提交于 2020-07-07 05:45:17
问题 This code works for me, except all my files are on a network drive. In the example below, the code works only if the file is in the root directory ( c:\ ) as an example. Do I have to replace input.pdf with something like d:\hello space folder\filefolder\input.pdf ? I tried this, but got a sleuth of errors saying directory not found. I tried to do netuse and map the network main drive folder, but that didn't work either. gswin32c ^ -q ^ -dNODISPLAY ^ -c "(input.pdf) (r) file runpdfbegin

Rendering the whole media box of a pdf page into a png file using ghostscript

会有一股神秘感。 提交于 2020-06-27 18:24:30
问题 I'm trying to render Pdfs pages into png files using Ghostscript v9.02. For that purpose I'm using the following command line: gswin32c.exe -sDEVICE=png16m -o outputFile%d.png mypdf.pdf This is working fine when the pdf crop box is the same as the media box, but if the crop box is smaller than the media box, only the media box is displayed and the border of the pdf page is lost. I know usually pdf viewers only display the crop box but I need to be able to see the whole media page in my png

How can I save a Turtle canvas as an image (.png or .jpg) in Python 3

折月煮酒 提交于 2020-06-17 09:37:07
问题 I've been working with the turtle module and want to use it as a starting point to work on a simple image recognition program that could recognize numbers/letters. I need to be able to save the turtle as an image I could manipulate- recaling, rotating, etc. to try to regulate the images. I've been researching for hours and cannot seem to find anything that works. I have discovered how to save the Turtle output as a Tkinter canvas: import turtle t = turtle.Turtle() # Draw something canvas = t

Ghostscript: how to decide the output resolution of converting a multi-page PDF to multiple TIFFs

狂风中的少年 提交于 2020-05-11 07:33:07
问题 I need to extract TIFF images from a bunch of multi-page PDF files from a scanner. During the scanning I specified a resolution of 600dpi. Here is the code I used to generate TIFF images: gs -q -dNOPAUSE -sDEVICE=tiffg4 \ -sOutputFile=a_page%02d.tif a.pdf -r600x600 -c quit This gave me the correct number of TIFF images, however, the image dimension is smaller than I expected. No matter how I change the -r option, the output images have the same size. What happened here? The output TIFF images

ImageMagick with PHP text overflowing PDF to JPG conversion

时光总嘲笑我的痴心妄想 提交于 2020-04-30 15:45:29
问题 I'm trying now to convert a PDF file to JPG, using ImageMagick with PHP and CakePHP. The PDF is in perfect shape and it's right the way it should be, but the image generated from the PDF is always overflowing the borders of the file. Until now, I've tried tweaking the code for the generation with no sucess, reading a lot from the PHP docs (http://php.net/manual/pt_BR/book.imagick.php). Here are the convertion code: $image = new Imagick(); $image->setResolution(300,300); $image-

How to transfer OCR text from one PDF to another PDF?

落花浮王杯 提交于 2020-04-30 09:07:46
问题 I have two versions of one same scanned PDF. One of them has an OCR layer. How can I transfer the layer to the other one? I already install Ghostscript, but I don't know what to do next. How to Use Ghostscript 回答1: There's no such thing as an 'OCR layer' in PDF. Most likely what you have is a PDF file which has a scanned image and the text extracted from that image using OCR which has been drawn as 'invisible' text (text rendering mode 3). In general you can't copy and paste text between PDF

How to transfer OCR text from one PDF to another PDF?

半腔热情 提交于 2020-04-30 09:07:15
问题 I have two versions of one same scanned PDF. One of them has an OCR layer. How can I transfer the layer to the other one? I already install Ghostscript, but I don't know what to do next. How to Use Ghostscript 回答1: There's no such thing as an 'OCR layer' in PDF. Most likely what you have is a PDF file which has a scanned image and the text extracted from that image using OCR which has been drawn as 'invisible' text (text rendering mode 3). In general you can't copy and paste text between PDF

美国国家海洋和大气局(NOAA)的后向轨迹模式(HYSPLIT)的安装

梦想与她 提交于 2020-04-24 04:25:14
https://ready.arl.noaa.gov/documents/Tutorial/html/install_win.html 安装参考网站一步一步来 1-5步 安装:以下四个:(安装时最好都选自默认目录) Tcl/Tk:用于模式系统的界面 直接解压到C盘program Ghostscript/Ghostview:用于显示矢量图像(esp格式) ImageMagic :用于图形格式的转化 HYSPLIT (选择自己系统的版本) 安装完设置好环境变量(两个地方) 安装好了 打开 闪退 原因 : 选错了打开方式 选择C:\Program Files\tcl\tcl\bin里面的 出现下图 安装成功 GBL数据下载路径 ftp://arlftp.arlhq.noaa.gov/pub/archives/reanalysis/ 来源: oschina 链接: https://my.oschina.net/u/4261593/blog/3536848

Ghostscript won't generate PDF/A with UTF16BE text string detected in DOCINFO - in spite of PDFACompatibilityPolicy saying otherwise

自闭症网瘾萝莉.ら 提交于 2020-04-16 04:18:08
问题 I am trying to convert normal PDF files to PDF/A with this command line: gs -dPDFA -dBATCH -dNOPAUSE -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite -sPDFACompatibilityPolicy=1 -sOutputFile=output.pdf input.pdf However, I get the message GPL Ghostscript 9.26: UTF16BE text string detected in DOCINFO cannot be represented in XMP for PDF/A1, reverting to normal PDF output an gs reverts to normal PDF. Apparently, the message stems from this code fragment of gs, but there we read that the message