[clug-talk] Create / Edit / Save PDF - Open Source for Windows

Robert Toole robert.toole at kuehne-nagel.com
Thu Mar 17 10:15:22 PST 2005


I have found the easiest way is to do it with samba, You create a 
special printer share on the samba box, and use a color laserjet 
postscript driver on the windows host. (My favorite is the HP Color 
laserjet 5 PS driver)

You then can create a PDF from *any* Windows App that can print.

You create a file share on the samba box where the users can get their 
pdf document generated by samba.

Here is the relevant stuff from my smb.conf: (Mind the line wrapping)

I don't take credit for the code, I found it on google...

# Share where the user can get their PDF

[PDF_Docs]
         comment = PDF Conversions
         path = /data/PDF
         read list =
         write list =
         read only = No
         create mask = 0700
         directory mask = 0700

# The commands for samba to create the PDF:

[PDF_Printer]
         comment = Convert Documents to PDF Format
         path = /var/spool/samba
         printable = Yes
         printing = lprng
         print command = /usr/bin/ps2pdf -dEmbedAllFonts=true %s 
/data/PDF/%U-`echo "%J" | tr -d ' ' | sed 's/Mic
rosoft//' | tr -d [\&\%\=\?\+] | tr '\\\' '/' | xargs basename | sed 
's/....$/.pdf/' | sed 's/\.\./\./'`; rm -f
%s; /usr/bin/find /data/PDF/ -type f -cmin +1440 -exec rm -f {} \;
         lpq command = echo "Printer: %p at zulu (dest ps2pdf)"; echo " 
Queue: no printable jobs in queue"; echo " S
tatus: Ready"
         lprm command = lprm -P'%p' %j
         lppause command = lpc hold '%p' %j
         lpresume command = lpc release '%p' %j
         queuepause command = lpc stop '%p'
         queueresume command = lpc start '%p'


Hope this helps.

Robert Toole
Sr. Systems Engineer
KN Logistics / Calgary

Trever Miller wrote:
> smagnuson at forzani.com wrote:
> 
>> OpenOffice ?
>> http://www.openoffice.org/
> 
> 
> I've had some issues with OO 1.1 pdf generation producing some garbled
> bits here and there. I hope it's better with OO 2.0
> 
> Unfortunately this means I have had to punt and use windows for pdf
> generation. I've had good results with cutepdf writer (free as in beer),
> which integrates and looks just like a windows printer. So you can use
> any app on Windows to create a document then print to cutepdf writer.
> 
> Cutepdf writer requires you to install a version of ghostscript. Both
> ghostscript and the cutepdf packages are available at
> 
> http://www.cutepdf.com/Products/CutePDF/writer.asp
> 



More information about the clug-talk mailing list