ghostscript

Replace Specific Document in PDF

做~自己de王妃 提交于 2019-12-24 16:10:04
问题 Includes: using Ghostscript.NET; using Ghostscript.NET.Processor; using Ghostscript.NET.Rasterizer; Right now, I am using Ghostscript.Net to merge several single PDFs into a single document: /// <summary> /// Ghostscripts the file specified in parameter 1 as a PDF to the file specified in parameter 2 /// </summary> /// <param name="fileNames">String[]. Array of Full Paths to a file to convert to a single PDF</param> /// <param name="outputPath">String. Full Path to where Ghostscript will

Specify default substitution font when converting pdf to image using imagemagick and font is missing

痴心易碎 提交于 2019-12-24 12:11:51
问题 I am using Spatie/pdfToImage that builds on ghost script and imagemagick to on my server: Take a multiple page pdf from an email using mailgun routing. Save the pdf in folder /docs_pdf like file.pdf Use a foreach to loop through each page and save each page as a png to /docs like file_#.png locally where I use laravel -> valet everything works fine. On my server using digital ocean through laravel forge the language in a multipaged pdf that is in swedish transforms from normal swedish to a

getting ghostscript to take in files with spaces in their name (like something in “my documents”)

半世苍凉 提交于 2019-12-24 07:35:37
问题 I'm trying to run this command to use ghostscript (from java) but Whether with single quote ' or " or nothing at all I get an error Error: /undefinedfilename in ('c:\\Documents) gswin32c.exe -q -dNOPAUSE -sDEVICE=tiffgray -sOutputFile=C:\polter.tiff -r300 'c:\Documents and Settings\polter.pdf' -c quit any ideas? 回答1: use the short names for folders. short names are aliases which are using the 8.3 format. you can find the short name of a folder by using the dir /x command on the command prompt

Creating PDF file in PowerBuilder

与世无争的帅哥 提交于 2019-12-24 01:24:44
问题 I am new to PowerBuilder. I got an assignment to create a PDF file using PowerBuilder. How can I do that? 回答1: as suggested by Alberto Megia, download PDF creator, but dont use SAVE AS. After you install pdf creator it will install a printer, use that printer to save the datawindow with the print function. after call print function, you will see a "Save as" dialog. If you use "saveas" function, the pdf will not have the format that the datawindow shows. 回答2: Our organization used to use

display ghostscript version number through PHP in ubuntu

寵の児 提交于 2019-12-23 23:42:44
问题 I have written the following code for showing the version number of ghostscript: <html> <head> <title></title> </head> <body> <? $ver = shell_exec("/usr/bin/gs --version"); //$ver = exec(GS_BIN . " --version"); print "$ver"; print "A"; ?> </body> </html> I can get the A printed, but not the version number why? Thanks. 回答1: Possibly ghostscrsipt is writing the data out to STDERR instead of STDOUT. Try doing /usr/bin/gs --version 2>&1 to redirect stderr to stdout and try again 回答2: You should

Get the layout mode (landscape or portrait) of a pdf from php/linux

◇◆丶佛笑我妖孽 提交于 2019-12-23 18:36:03
问题 Given a PDF, how can one get the layout mode of a PDF (or relative width/height) using a PHP lib or linux command line tool? Using http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf which can set this variable on new PDFs, but for existing pdfs from adobe. Thought of converting pdfs to ps, or using gs in some other way - like converting it to an image first, and getting the width and height of that. Is this the best way? 回答1: The solution I'm using is to use ghostscript to print

Ghostscript error with print function in Matlab

雨燕双飞 提交于 2019-12-23 18:00:04
问题 I am trying to save images in Matlab by using the print function: myImage = magic(500); myFigure = figure('visible','off'); r = 1; set(myFigure, 'PaperUnits', 'inches', 'PaperPosition', [0 0 1920 1080]/r); % the program works fine on both computers without the line above % however, the program runs fine on one computer only with this line imagesc(myImage); axis image; print(myFigure, '-dpng', sprintf('-r%d',r), 'myOutput.png'); When I run this program locally with Matlab R2012b, it works as

Different results when R script is automated

不羁岁月 提交于 2019-12-23 09:29:47
问题 The following command executes ghostscript on a pdf file. (the pdf_file variable contains the path to that pdf) bbox <- system(paste( "C:/gs/gs8.64/bin/gswin32c.exe -sDEVICE=bbox -dNOPAUSE -dBATCH -f", pdf_file, "2>&1" ), intern=TRUE) After execution bbox includes the following character string. GPL Ghostscript 8.64 (2009-02-03) Copyright (C) 2009 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 1.

Ghostscript suppress output windows when called by command line

…衆ロ難τιáo~ 提交于 2019-12-23 08:04:35
问题 This is my scenario: I'm converting PDF files to PNG images calling Ghostscript by C#. This is the argument string I use: -dNOPAUSE -dBATCH -dFirstPage=1 -q -r300 -sDEVICE=png256 -sOutputFile=... But, in this way, when I call Ghostscript it shows a window where (before I've added -q ) there were output messages. I've tried adding -dNODISPLAY after -r300 . But in this way Ghostscript doesn't work and doesn't create images. Question: In which way can I suppress the output window? 回答1: If you

Convert PS files to PDF/A via Ghostscript, color space problems

痴心易碎 提交于 2019-12-23 02:25:08
问题 I am faced with a quite similar issue as discussed in this thread. Using GhostScript 9.14 I am trying to create a valid PDF/A from a Postscript file. I am invoking following command: "gswin64.exe" -dPDFA=1 -dBATCH -dNOPAUSE -dNOOUTERSAVE -sColorConversionStrategy=/RGB -sOutputICCProfile=AdobeRGB1998.icc -sDEVICE=pdfwrite -sOutputFile=output.pdf -dPDFACompatibilityPolicy=2 "PDFA_defRGB.ps" input.ps After doing so I validate via Apache's PDFBox and online via www.pdf-tools.com. PDF-tools tells