Re: postscript

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 21 April 2006 14:45, brouwers roland lx wrote:
> Hello,
>
> What do I want to do?
> Print a worddoc(Microsoft or openoffice) to a printer that will
> produce a ps, which has to be transformed to a pdf file, which
> will be send by email, as an attachment.
>
> I am searching the internet for days now, to find a way to
> produce a postscript file, without printing to a printer. This
> file can be transformed to pdf with ps2pdf.
>
> Or is there another way?

It's been a couple of years now since I did this but here are some 
notes for a "network pdf printer" using samba if you want to set 
one up for your own network.  

This printer will convert the document you wish to print to a "PDF" 
file.  All you should have to do is to install a new printer on your 
machine:

Network Printer:

\\Sambashare\pdf


Printer Type:

HP Color LaserJet 5/5M PS (Postscript)
( This is the printer driver to select that creates the PS file )

and when you print to it, the resulting PDF file will be stored on 
the shared drive at:

\\Sambashare\pdfdocs

The file will be named according to the date and time you issued the 
print command. For example the file:

May03-142120.pdf


============= smb.conf =================
 
[PDFDocs]
        comment = SambaOne PDF Printer Documents
        path = /mnt/pdfdocs
        writeable = yes
        guest ok = yes

; Set up our PDF-creation print service
[pdf]
   path = /tmp
   printable = yes
   guest ok = yes
   print command = /usr/bin/printpdf %s 
   lpq command =
   lprm command =

=============== /usr/bin/printpdf ================
(Scarfed from a fellow by the name of John Bright seen below...)

#!/bin/sh
# script to convert a specified postscript file into a PDF document
# and place it in a location that is shared by the Samba server.
#
# Arguments:
#   1st - The name of the spool file
#
# John Bright, 2001, jbright@xxxxxxxxxxxxxx
# create the pdf into a temporary file based on current date and 
time.
# After we are finished, rename it same date, but ending
# in .pdf.  We do this because if a user tries to open a PDF that is 
# still being written, they will get a message that it is corrupt,
# when it is actually just not done yet.

DATE=`date +%b%d-%H%M%S`

# Directory in which to place the output
# Be sure this directory exists and is writable by the user that 
Samba
# is running as (for example, the nobody user)

OUTDIR=/mnt/pdfdocs

ps2pdf $1 $OUTDIR/$DATE.temp

mv $OUTDIR/$DATE.temp $OUTDIR/$DATE.pdf

rm $1


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux