ghostscript

Powershell script to print specific PDF pages into images

我与影子孤独终老i 提交于 2019-12-02 04:49:21
问题 How I could I change this powershell script Start-Process –FilePath “C:\Data\PROJECTS\ABC.pdf” –Verb Print -PassThru | %{sleep 10;$_} | kill to: print specific pages of a PDF, directly to an image (e.g. png,jpg,tif, etc), and save them accordingly? For example, I want to print pages 3,4,7 of ABC.pdf into three separate files called ABC_3.png, ABC_4.png, and ABC_7.png; the image file can be any format (.png, .jpg, .tif, etc.). I plan to call on a .csv list to get all the parameter values (e.g.

Cannot get PB 10.5 to save as PDF on Windows 7

♀尐吖头ヾ 提交于 2019-12-02 04:02:19
问题 I have an application built in 10.5 that was able to successfully create PDFs using SaveAs on Windows XP. When I moved to Windows 7 (32-bit), it failed by returning -1 and a zero length file. I have tried everything I can figure out. I have tried numerous version of Ghostscript (8.54, 8.71, 9.01), deleted the driver and re-added it. I copied the ghostscript EXEs and DLLs into my application directory as well. System variables include a GS_DLL=C:\Program Files\gs\gs9.01\bin\gsdll32.dll and a

PDF crop even-odd pages with PHP + GhostScript

不羁岁月 提交于 2019-12-02 03:46:07
I am working in a routine for crop PDF's and import them into a PDF template. I am using GhostScript, invoked with exec() from a PHP script, and FPDI. All running server-side. So far, I am able to crop pdf documents with GhostScript using the procedure explained in this post (setting CropBox ). The next step is to crop differently the even and odd pages of a document. So I tried the method explained in this other post in SuperUser site, passing custom PostScript code into -c parameter to GhostScript: -c "<< /CurrPageNum 1 def /Install { /CurrPageNum CurrPageNum 1 add def CurrPageNum 2 mod 1 eq

PHP: Uncaught ImagickException: PDFDelegateFailed

与世无争的帅哥 提交于 2019-12-02 02:31:26
问题 I want to generate images from pdf pages in PHP. I am using imagick php extention to achieve this but I am getting error below when i am tring to read pdf file by imagick Fatal error: Uncaught ImagickException: PDFDelegateFailed `The system cannot find the file specified. ' @ error/pdf.c/ReadPDFImage/801 My code is $imagick = new Imagick(); $imagick->readImage(dirname(__FILE__). '/test.pdf'); My Server details from phpinfo() PHP: Version 7.0.13 System: Windows NT LALMANI-PC 6.1 build 7601

Powershell script to print specific PDF pages into images

社会主义新天地 提交于 2019-12-02 02:08:39
How I could I change this powershell script Start-Process –FilePath “C:\Data\PROJECTS\ABC.pdf” –Verb Print -PassThru | %{sleep 10;$_} | kill to: print specific pages of a PDF, directly to an image (e.g. png,jpg,tif, etc), and save them accordingly? For example, I want to print pages 3,4,7 of ABC.pdf into three separate files called ABC_3.png, ABC_4.png, and ABC_7.png; the image file can be any format (.png, .jpg, .tif, etc.). I plan to call on a .csv list to get all the parameter values (e.g. page number to print, output name with page number, filepath to new file location, etc) but I don't

Creating PDF/A with GhostscriptProcessor

十年热恋 提交于 2019-12-02 02:02:50
I want to convert a PDF file into PDF/A with GhostscriptProcessor, but the result is a PDF not PDF/A. GhostscriptProcessor gsproc = new GhostscriptProcessor(Properties.Resources.gsdll32); gsproc.StartProcessing(CreatePDFA(@"C:\test\PDF.pdf", @"C:\test\PDFA.pdf"), new GsStdio()); And the method: CreateTestArgs(string inputPath, string outputPath) { List<string> gsArgs = new List<string>(); gsArgs.Add("-dPDFA"); gsArgs.Add("-dBATCH"); gsArgs.Add("-dNOPAUSEgsArgs"); gsArgs.Add("-sDEVICE=pdfwrite"); gsArgs.Add(@"-sOutputFile=" + outputPath); gsArgs.Add(@"-f" + inputPath); return gsArgs.ToArray();

Cannot get PB 10.5 to save as PDF on Windows 7

烂漫一生 提交于 2019-12-02 00:17:41
I have an application built in 10.5 that was able to successfully create PDFs using SaveAs on Windows XP. When I moved to Windows 7 (32-bit), it failed by returning -1 and a zero length file. I have tried everything I can figure out. I have tried numerous version of Ghostscript (8.54, 8.71, 9.01), deleted the driver and re-added it. I copied the ghostscript EXEs and DLLs into my application directory as well. System variables include a GS_DLL=C:\Program Files\gs\gs9.01\bin\gsdll32.dll and a PATH that has C:\Program Files\gs\gs9.01\bin\; in it (tried it listed first and last in the path). When

PHP: Uncaught ImagickException: PDFDelegateFailed

一世执手 提交于 2019-12-01 23:10:41
I want to generate images from pdf pages in PHP. I am using imagick php extention to achieve this but I am getting error below when i am tring to read pdf file by imagick Fatal error: Uncaught ImagickException: PDFDelegateFailed `The system cannot find the file specified. ' @ error/pdf.c/ReadPDFImage/801 My code is $imagick = new Imagick(); $imagick->readImage(dirname(__FILE__). '/test.pdf'); My Server details from phpinfo() PHP: Version 7.0.13 System: Windows NT LALMANI-PC 6.1 build 7601 (Windows 7 Ultimate Edition Service Pack 1) i586, Architecture: x86 imagick module version: 3.4.3 Imagick

Conversion of TIFF to PDF with Ghostscript

人走茶凉 提交于 2019-12-01 17:28:29
Could you tell me how can I convert TIFF to PDF with using Ghostscript or Postscript? I tried to use this command: gswin32c.exe -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=o.pdf test.tif But it doesn't work. It produces an error: GPL Ghostscript 9.06 (2012-08-08) Copyright (C) 2012 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Error: /undefined in II* Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false

Conversion of TIFF to PDF with Ghostscript

给你一囗甜甜゛ 提交于 2019-12-01 16:14:05
问题 Could you tell me how can I convert TIFF to PDF with using Ghostscript or Postscript? I tried to use this command: gswin32c.exe -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=o.pdf test.tif But it doesn't work. It produces an error: GPL Ghostscript 9.06 (2012-08-08) Copyright (C) 2012 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Error: /undefined in II* Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-