Ghostscript Ps2pdf Download ##TOP##

0 views
Skip to first unread message

Velva Naderman

unread,
Jan 24, 2024, 9:22:36 PM1/24/24
to iklecoschalk

However, the option you use does fails. -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite are defined in ps2pdf script, you don't need them. -sOutputFile can also be replaced. It's safe if you use them, however.

Ghostscript Ps2pdf Download


Download File ✫✫✫ https://t.co/2HVGsfMOSu



There are other utility scripts besides ps2pdf, including pdf2ps, ps2epsi, pdf2dsc, ps2ascii,ps2ps and ps2ps2. These just call Ghostscript with the appropriate(if complicated) set of options. You can use the 'ps2' set with eps files.

As a convenient shorthand you can use the -o option followed by the outputfile specification as discussed above. The -o option also sets the-dBATCH and -dNOPAUSE options.This is intended to be a quick way to invoke ghostscript to convert one or moreinput files.

The win32 installer of recent version of ghostscript has a checkbox for"Use Windows TrueType fonts for Chinese, Japanese and Korean" to optionally updatelib/cidfmap with the common CJK fonts provided by Microsoft products. The scriptcan also be run separately (e.g. against a network drive with windows CJK fonts):

In addition, calling ghostscript with --debug will list all the currentlydefined (non visual trace) debugging flags, both in their short form (as listedabove for use with -Z) and in a long form, which can be used as in:--debug=tiling,alloc. All the short form flags for -Zhave an equivalent long form. Future flags may be added with a long form only (due to all the short form flags being used already).

A thousand apologies if this has already been answered, but I can't find a solution for the life of me. Seems like it should be the simplest thing. I installed Ghostscript 9.23 and I'm trying to use the ps2pdf command to convert a document. The script runs up to the very last line then throws an error:

The ps2pdf scripts are work-alikes for nearly all the functionality (but not the user interface) of Adobe's Acrobat(TM) Distiller(TM) product: they convert PostScript files to Portable Document Format (PDF) files.

There are some limitations in ps2pdf's conversion. See the HTML documentation for more information. A large number of Adobe Distiller(TM) parameters which can be used to control the conversion are also documented there, including instructions for generating PDF/X and PDF/A documents.

Something had left an empty directory at /usr/share/ghostscript/9.25/iccprofiles. It appears that libgs9-common creates a symlink from /usr/share/ghostscript/9.25/iccprofiles to /usr/share/color/icc/ghostscript, but silently fails to create it if there's already something in the filesystem.

At my former job I had used Distiller to create PDFs from PS output from Creo. It worked well and bypassed the many issues I saw with the built-in PDF creation in Creo. I'd like to do the same here, but we do not have Distiller available to all users. I was looking at using Ghostscript, specifically the ps2pdf utility as a Distiller replacement, but I'm having no luck with it. Unfortunately, the learning curve for GS is rather steep.

I've run the 64 bit GS installer and added a couple of install folders to my path statement and ps2pdf runs without error (I'm using the syntax "path/to/ps2pdf inout.ps output.pdf") but produces no output.

I tried compiling ghostscript myself with modified PKGBUILD that does not remove the shipped libraries from ghostscript. This didn't do anything about the issue.
I tried viewing the ps file with evince, atril and okular. Does not work (although they might be using ghostscript for anyway so I don't know if this is an indicator that the ps file is broken)

Quick note here, suppose you save a PostScript file and convert it toPDF via ps2pdf, but the orientation was not properly embedded in thePDF. How do you fix this? Use this command line rather than theps2pdf command:

When there is no text on the page or automatic page rotation is set to /None an orientation value from setpagedevice is used. Valid values are: 0 (portrait), 3 (landscape), 2 (upside down), and 1 (seascape). The orientation can be set from the command line as -c " setpagedevice" using Ghostscript directly but cannot be set in ps2pdf. See Limitations below.

ps2pdf is a rather limited utility. It is merely a small batch file (on Unix/Linux: a shell script) which constructs and calls the rather complex Ghostscript commandline while itself using a very simple commandline syntax.

If you are unsure of what compatibility level to use, stick with the default. If you have version 7.0 or higher of GhostScript installed on your computer, you can use the ps2pdf13 or ps2pdf14 scripts to automatically set the compatibility level.

If you see this, try recreating the PostScript file and running ps2pdf again. This kind of error message also rears its head when you mistype the name of the PostScript file. Check your typing against the name of the PostScript file and try running it through ps2pdf again.

The closest thing to an APT repository is F-droid, but that's mainly for GUI apps: it's an alternative to Google Play for downloading open-source apps. I've already searched there and there's nothing like ps2pdf.

As far as I know ps2pdf, and also ps2pdf13, ps2pdf14, etc, (on my Linux laptop) are not standalone executable binary programs, but convenience shellscripts that are part of the Ghostscript distribution, which call gs with the correct parameters and options. If you take a look at the Github pages for Termux you can see that porting Ghostscript (at the time of me writing) for Termux is a work in progress that has not been succesful yet. Ghostscript is a powerful but complex package to compile. But there is hope ...

M. Tarenskeen is correct. When you install Ghostscript in Termux, you automatically get a whole slew of valuable utility programs with it, including ps2pdf. Once gs is installed, just type `which pf2pdf' and there it is!

Gnuplot supports both PostScript and PDF "terminals." Just select the one you like best. If it's PS, then ps2pdf makes short work of the PDF output. Choosing the PDF terminal bypasses the explicit conversion step. What I've done is put a symlink called "storage0" from my Termux home directory to /storage/emulated/0. I can copy the finished plot into the symlinked directory, and voila! It's right there, immediately accessible to any Android utility.

Most of these programs will accept Postscript or encapsulated Postscript as input. However, in some cases, non-Postscript formats are needed or preferred. For example, web browsers typically expect GIF, PNG, or JPEG images. Also, Dataplot does not generate the optional bit-map preview for encapsulated Postscript (although you can add one using Ghostview on Windows). Most programs do not actually convert Postscript files. Instead, they use the bit-map preview when displaying on non-Postscript devices and the original Postscript when displaying on Postscript devices. In these cases, it may be more convenient to import a JPEG version of the graph. The SET POSTSCRIPT CONVERT command is used to specify one of the following devices:

  1. JPEG
  2. PDF (Portable Document Format)
  3. TIFF (Ghostscript supports a number of tiff devices, Dataplot currently uses the "tifflzw" device)
  4. PBM (Portable Bit Map, supports black and white only)
  5. PGM (Portable Grey Map, supports greyscale, but not color)
  6. PPM (Portable Pix Map, supports color)
  7. PNM (Portable Any Map, covers PBM, PGM, PPM)
If one of these devices is set and a Postscript device is closed, then Dataplot invokes Ghostscript to convert the Postscript output to the specified device. The original Postscript file is preserved. The new file has the same name with the file extension replaced with "jpg", "pdf", "tif", "pbm", "pgm", "ppm", or "pnm" (depending on the selected device). Note that Ghostscript supports conversion to a wide variety of output devices. The devices selected above were the ones that are the most useful in exporting Dataplot graphs to other software programs. Since our purpose for this command was to provide graphic formats suitable for input into other programs, we did not add support for the printer devices. If your main interest is simply in printing to a non-Postscript device, then run Ghostview after exiting Dataplot to print the Postscript file. Between the original Postscript and the devices supported using the SET POSTSCRIPT CONVERT, it should be possible to import Dataplot graphics into most external programs. In particular, the JPEG and PBM formats (PBM, PGM, PPM, and PNM) are supported by most image conversion programs. Alternatively, you can also use the "convert" program from the Image Magick software or the PS2PDF program (part of the Ghostscript installation). See the Note section below for details. Syntax 1:
    SET POSTSCRIPT CONVERT
    where is one of JPEG, PDF, TIFF, PBM, PGM, PPM, or PNM (any other choice is converted to NULL).
Syntax 2:
    SET POSTSCRIPT CONVERT
    where is one of GHOSTSCRIPT, CONVERT, or PS2PDF.
Syntax 3:
    SET POSTSCRIPT CONVERT
    where is one of GHOSTSCRIPT, CONVERT, or PS2PDF. and is one of JPEG, PDF, TIFF, PBM, PGM, PPM, or PNM (any other choice is converted to NULL).
Examples:
    SET POSTRSCRIPT CONVERT PDF
    SET POSTRSCRIPT CONVERT JPEG
    SET POSTRSCRIPT CONVERT PPM
Note:
    This command assumes that Ghostscript is installed on your local system. Currently, it is implemented on Unix (this includes Linux, Mac OSX, and FreeBSD) and Windows platforms. It can easily be extended to any platform (e.g., VAX VMS) to which Ghostscript has been ported. Contact Alan Heckert (alan.h...@nist.gov) if you have a platform that you would like supported. For Unix platforms, Ghostscript is launched with the command
      gs
    If gs is not in your default path, you can enter something like
      set ghostscript path /usr/local/bin
    On Windows platforms, Ghostscript is launched with
      \GSWIN32C.EXE
    where is the directory defined by the SET GHOSTSCRIPT PATH command. As of the 08/2019 version of Dataplot, the default path is
      C:\Program Files\GS\GS9.27\BIN
    If Ghostscript is installed in a different directory (typically the "GS9.27" will be different if you have installed a different version of Ghostscript), you can specify the correct directory with the command
      SET GHOSTSCRIPT PATH
    Enter HELP GHOSTSCRIPT PATH for details. If you have installed the 64-bit version of Ghostscript, enter the command
      SET GHOSTSCRIPT VERSION 64
    This will run the command GSWIN64C.EXE instead of GSWIN32C.EXE. To reset the 32-bit version, enter
      SET GHOSTSCRIPT VERSION 32
    If you select the CONVERT option, you must have the Image Magick software installed on your local platform and the convert program should be in your default path.
Note:
    If you use the GHOSTSCRIPT or PS2PDF option on Windows platforms, there are two addtional issues to consider.
    1. Dataplot will typically try to run the underlying SYSTEM command in "hidden" mode. In "hidden" mode, the command prompt window will not pop up. However, if either the program name or the file name contains spaces, the hidden mode cannot currently be used. In particular, the path name for the Ghostscript directory contains a space (i.e., the "Program Files") One solution is to add the following directory to your default path
        C:\Program Files\gs\gs9.27\bin
      Change 9.27 to match the version of Ghostscript you have installed. Also, non-English systems will typically have a slightly different name for "Program Files".
    2. For the PS2PDF option, the PS2PDF.BAT script is actually in the "lib" directory. In addition, the script calls the Ghostscript executable without a path name. So if you want to use PS2PDF, then the following directories need to be added to your default path
        C:\Program Files\gs\gs9.27\bin
        C:\Program Files\gs\gs9.27\lib
    To add directories to your default path, do the following
    1. Bring up the Control Panel.
    2. Select "System and Security".
    3. Select "System".
    4. Select "Advanced System Settings".
    5. Select "Environment Variables".
    Then use the "Enviroment Variables" menu to add the needed directories.
Note:
    By default, the conversion is performed by Ghostscript. You can also specify the "convert" program that is part of the Image Magick software by entering the command
      SET POSTSCRIPT CONVERT CONVERT
    To reset the use of Ghostscript, enter
      SET POSTSCRIPT CONVERT GHOSTSCRIPT
    You can also specify the use of the ps2pdf program to perform the conversion. The ps2pdf program is a batch script file that is typically installed as part of the Ghostscript installation. Linux installations will typically have Ghostcript and ps2pdf installed. The GHOSTSCRIPT option generates a Ghostscript command to perform the conversion, so the GHOSTSCRIPT and PS2PDF options perform essentially the same conversion. The advantage of the PS2PDF option is that it has a simpler syntax. The advantage of the GHOSTSCRIPT option is that it is not limited to converting the Postscript to PDF format (it also supports JPEG, TIFF, PBM, PBM, PGM, PPM, and PNM). The SET GHOSTSCRIPT PATH applies to the PS2PDF option as well.
Note:
    The converted image is created with a density of 72 dots per inch in both the horizontal and vertical directions. You can specify a different resolution with the commands
      SET CONVERT DENSITY HORIZONTAL
      SET CONVERT DENSITY VERTICAL
Note:
    When converting to an image format, you will typically want each graph in a separate file. You can do this as follows:
      SET POSTSCRIPT CONVERT JPEG
      ORIENTATION LANDSCAPE WORDPERFECT
      SET IPL1NA PLOT1.PS
      DEVICE 2 POSTSCRIPT
      ... generate first plot ...
      DEVICE 2 CLOSE
      SET IPL1NA PLOT2.PS
      DEVICE 2 POSTSCRIPT
      ... generate second plot ...
      DEVICE 2 CLOSE
    After these commands are run, you will have the Postscript files PLOT1.PS and PLOT2.PS. In addition, you will have the JPEG files PLOT1.jpg and PLOT2.jpg. PDF may sometimes be the exception. Acroread (and other PDF viewers) can read PDF files with multiple graphs in them.
Note:
    The CAPTURE HTML command is used to generate Dataplot output to a web page. If the PDF format is specified and the CAPTURE HTML command is activated, Dataplot will generate a link to the PDF file in the generated HTML code. Enter HELP CAPTURE for more information about the CAPTURE HTML option
Note:
    On some platforms, Dataplot can generate PNG and JPEG image files directly. Enter HELP GD for details.
Default:
    The default is device is NULL (i.e., no conversion is performed).
Synonyms:
    SET OUTPUT DEVICE
Related Commands:
    DEVICE xx POSTSCRIPT = Set the device to Postscript. PP = Print the current plot. SET GHOSTSCRIPT PATH = Set the directory where Ghostscript is installed. SET GHOSTVIEW PATH = Set the directory where Ghostview (and GSPRINT) is installed. SET GHOSTSCRIPT PRINTER = Use Ghostview as the default printer under Windows. GD = Specify the GD device for generating PNG and JPEG graphics.
Applications:
    Graphics Output
Implementation Date:
    2003/01
    2007/10: Added support for the "convert" program from ImageMagick
    2009/03: Added support for user specified density
    2019/08: Added support for the "ps2pdf" program
Program:
    SET GHOSTSCRIPT PATH /usr/local/src/bin/ SET POSTSCRIPT CONVERT JPEG DEVICE 2 POSTSCRIPT PLOT SIN(X) FOR X = -6 0.1 6 DEVICE 2 CLOSE SYSTEM xv dppl1f.jpg
Privacy Policy/Security Notice
Disclaimer FOIA

dd2b598166
Reply all
Reply to author
Forward
0 new messages