> I would like to be able to create PDFs under RH8.0, also it would be nice
> if I could print from Windows into RH8.0 server, which would generate PDFs
> out of the print job. Any ideas, suggestions?

This is from some of my notes for my web site let me know if I can improve
it.
Thanks, Chad

Using SAMBA to print PDF files

The SAMBA file server Provides printer and file sharing features by
emulating a Windows NT server. The combination of this server with the
ghostscript one can create a virtual printer that will create PDF files.
This requires three primary steps creating a script to process the print
spool file, modifying the smb.conf file to create a virtual printer and
setting up a postscript printer on the windows client.

Create a Shell Script to process the spool file:

The script file I have listed below processes the spool file and places the
resulting PDF file in a specified folder within the users home directory.
The script requires the following three configuration variables be set:

   PDF_DIR = The directory within the users home directory
             where the resulting PDF is to be placed.
   PS2PDF = The location of the ps2pdf application
   SAMBA_SPOOL_DIR = The directory where the samba printer
                     spool file is located

To use this script copy the following text into the file
/usr/local/bin/make_pdf.


#!/bin/sh

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

   #$1 = User Home Directory
   #$2 = Name w/path of file to be converted
   #$3 = Name of print job submitted by client

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

   newName=`echo ${3} | sed s/[\|\/\\:]/-/g`

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


Modify the smb.conf File:

The next step is to configure samba to create a virtual printer. The
configuration below creates a printer called pdf_maker that simply calls the
make_pdf script and passes it the required parameters.

## Special Printer that Creates PDF Files ##

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


Configure the Windows Client

For this process to work you will need to configure the windows client to
use a PostScript printer to print to the pdf_maker spool. I have had good
luck using the generic PostScript printer driver from Adobe as well as a few
of the drivers from HP.


Conclusion

If you know of good PostScript drivers or have more suggestions please let
me know and as with all of my notes if you see anything that is not easy to
understand or is incorrect please let me know so that I can get it
corrected.



-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to