

The ghostscript option was somehow unset. The exit status is reported as a decimal number ( $? > 8), followed by " (signal %d)" if $? & 127 is non-zero, followed by " (core dumped)" if $? & 128. The temporary filename created by PostScript::File must have an extension, but it didn't. Psconvert only accepts a scalar or array reference as $input. You passed an object that psconvert doesn't accept as $input. Can't seek temporary file: %sĪ seek failed for the specified reason. There was an error while redirecting STDIN in order to run Ghostscript. These are the known sizes: "comm #10 envelope", "envelope-c5", "envelope-dl", "envelope-monarch", europostcard, executive, folio, "half-letter", ledger, legal, letter, superb, tabloid, "us-legal", "us-letter", A0 - A10, B0 - B10.
CONVERT PS TO PDF GHOSTSCRIPT CODE
Don't do this unless you trust the PostScript code you are converting. Passing unsafe => 1 will use -dNOSAFER instead. Ghostscript is normally run with -dSAFER, which prevents the PostScript code from accessing the filesystem. gs_paramĪn arrayref of additional parameters to pass to Ghostscript (for advanced users only). This is normally set automatically from the format. The Ghostscript device to use (for advanced users only). This is either a string of two integers separated by x ( XRESxYRES) or a single integer (if the X and Y resolution should be the same). (v0.02) The desired output resolution in pixels per inch. If omitted, Ghostscript will use its default paper size, unless you pass a PostScript::File object (or an object that supplies a PostScript::File), in which case the paper size will be taken from that object. This can be a string indicating a known paper size, a string of the form WIDTHxHEIGHT (where WIDTH and HEIGHT are in inches), or an arrayref of two numbers (where WIDTH and HEIGHT are in points). It does not mean to actually read from this file, and it need not exist on disk.) If omitted, it will be taken from $input (if that is a filename or a PostScript::File object containing a filename). (This is used only for calculating filename when necessary. (You may use a pathname here.) includeĪn arrayref of directories to add to Ghostscript's search path (for advanced users only). It defaults to gs, except on Microsoft Windows, where it is gswin32c.exe. This is the Ghostscript executable to use. (v0.03) grayscale JPEG with default extension. (v0.03) color JPEG with default extension. The default depends on your Ghostscript, but is usually 75. You can control the compression quality by using gs_param => (where N is an integer from 0 to 100). It's designed for photo-realistic images, not the text and line art more commonly found in PostScript files.) jpg (Note: JPEG encoding is not recommended. The preferred PDF version (currently 1.4, but subject to change). If omitted, it will be taken from the extension of filename. If omitted, it will be calculated from input and format. Options added since version 0.01 are marked with the version they were added in (e.g. If there are an odd number of arguments following $input, then the first one is the filename. The remaining arguments after $input are key-value pairs that control the output. (Note: there are 2 underscores after get) Output options The object must implement a get_PostScript_File method that returns a PostScript::File object. Note: in eps mode, this will generate multiple output files if the document has multiple pages. An open filehandleĪny argument accepted by "openhandle" in Scalar::Util is interpreted as a filehandle to read from. This must be a reference to an array of strings, which when joined together form a PostScript document. This must be a reference to a string containing a PostScript document. This is interpreted as a filename to open. $input must be one of the following: A string It throws an exception if an error occurs. This takes the PostScript code or PDF file pointed to by $input and processes it through Ghostscript. It exports a single function: psconvert psconvert($input,, ) You will need to have Ghostscript installed. PostScript::Convert uses Ghostscript to convert PostScript or PDF to other formats. Psconvert($ps, filename => $output_filename, format => 'pnggray') DESCRIPTION

Psconvert(\$postscript, $output_filename) # Base output filename on input filename: This document describes version 0.03 of PostScript::Convert, released March 15, 2014. PostScript::Convert - Use Ghostscript to convert PostScript or PDF to other formats VERSION
