> Covert the Word documents to PDF.
>
> You can either buy the tools from Adobe, or, if you have a Linux box
> available on the same network, you can setup a workaround. Setup a printer
> on the Windows box that uses the one of the HP Laserjet PS drivers.
> Configure the print settings to "Print to File". This will create a
> Postscript file that's easily convertable to PDF. When you print
> using this
> printer, save the file onto the Linux box with an extension of ".ps". Then
> login to the Linux box and run "ps2pdf" on the file. If you expect to do
> this a lot, then drop the PS files into a specific directory on the Linux
> box and setup a cron job and a shell script to automate the conversion.

Another option if you have samba running is to setup a samba share that will
accept a ps file and automatically convert it to a pdf. There are a couple
of sites that document this, but the short of it is you need to write a new
printer section in your samba config and override the default print
commands. Mine looks like the following:

[pdf_maker]
   comment = create a pdf file
   path = /var/spool/samba
   browseable = no
   guest ok = no
   printable = yes
   print command = /usr/local/bin/pdfmaker %H %s
   lppause command = ""
   lpresume command = ""
   lprm command = ""
   queuepause command = ""
   queueresume command = ""

Then you will need to have a script for the print command to execute, mine
is fairly simple and I am sure there are better ways to do this.

pdfmaker
-------------------
#!/bin/sh

# Parameters
# $1 - users home directory
# $2 - samba spool file

   PDF_DIR="pdf_files"
   PS2PDF="/usr/bin/ps2pdf"
   SAMBA_SPOOL_DIR="/var/spool/samba"

# Create the target directory for the pdf
# file if it does not exist

   if ! [ -d ${1}/${PDF_DIR} ]; then
      makdir -p ${1}/${PDF_DIR}
   fi

# Convert the spool file to a pdf

   ${PS2PDF} ${SAMBA_SPOOL_DIR}/${2} ${1}/${PDF_DIR}/${2}.pdf

# Remove the samba spool file

   rm ${SAMBA_SPOOL_DIR}/${2}

---------------------

This creates a folder in my home share called pdf_files that contains pdf
files for each of the print jobs sent to the samba printer.

Chad



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to