I'm a Linux system administrator, and I've had an extra job lately-helping some Windows users convert PostScript files to PDF format. This is because there is a free Ghostscript tool on Linux that can be easily implemented, but there is no free conversion tool under Windows.
I figured out a way for Windows users not to learn Linux commands, simply to "print" The file, to complete the conversion, as described below.
Basic principle
The rationale for this approach is to use Ghostscript to convert PostScript files to PDF format, and then create a virtual Ps-printer printer under Linux via Samba, The virtual printer is then used to output the converted PDF file to a shared directory for use by Windows users. The following is a brief introduction to the software that is applied.
1.Samba
Samba is a software operating in a Linux environment that provides Windows access to Linux, allowing users to easily share files and printers in different system environments.
2.Ghostscript
The Ghostscript includes a ps2pdf tool that converts PostScript to PDF format. If the system has a GS command, then the Ghostscript has been installed, otherwise you need to install according to the system version.
Set method
1. Create a "print" script
Create a script that converts the PostScript file in the print pool to PDF format and outputs it to the specified directory. By sharing the directory with Samba, users can read the PDF file they created.
First, set the read and write permissions for the file output directory for the relevant users:
#chown nobody/home/becks/pdf
#chmod 740/home/becks/pdf
Then, set the permissions of the other person according to the actual need.
When the permissions are set, create a script that converts the PostScript file to PDF format:
#! / bin / sh
name = 'date +% b% d-% h% m% s'
#Fill in the path to output the PDF file below
outdir = / home / becks / pdf
ps2pdf $ $ OUTDIR / $ Name.temp
MV $ OUTDIR / $ NAME. Temp $ OUTDIR / $ NAME. PDF
RM $
Place the script in the/usr/bin directory under the Linux system and name it printpdf. The script can also be downloaded to the http://www.ec-base.com/download/printpdf.txt.