kenneth.westelinck@pandora.be
2003-May-15 06:48 UTC
[Samba] PDF Samba Printer - ps2pdf Only Lette
ps2pdf +a4 gives this URL on google: http://linuxfr.org/~nicOnicO/1514.html ps2pdf -sPAPERSIZE=a4 monfichier.ps See if this helps. ------------------------ Matthew Western <mwestern@affairs.net.au> wrote: ------------------------ Hi all,> >I've got a nice working pdf samba printer emailing the right person >thanks to PeteFwee and David F and am doing a little testing. I've just >realized that it's set to Letter when it creates the .pdf file. and i've >googled till i'm blue in the face and can't see any options that says >page size or something similar. i'm running ghostscript 7.04. > >does anybody know how to make ps2pdf do A4 size paper? > >Here's my slightly modified script so it mails the user back... > >Regards > >Matthew > >_________________________________ > >#!/bin/sh > ># > ># This script is intended to be used as a CUPS backend, to create > ># PDF file on-the-fly. Just create a printer using the device uri > ># pdf:/path/to/dir/. When printing to this printer, a PDF file > ># will be generated in the directory specified. The file name will > ># be either ".pdf" or "unknown.pdf", depending wether the > ># jobname is empty or not. > ># > ># To use it, simply copy this script to your backend directory, and > ># create a printer with the correct URI. That's it. > ># > ># Copyright (C) Michael Goffioul (goffioul@imec.be) 2001 > >LOGFILE=/var/log/cups/pdf.log > >PDFBIN=`which ps2pdf` > >FILENAME= > ># this is borrowed from printpdf script for the filename > >PRINTTIME=`date +%b%d-%H%M%S` > >echo "Executable: $PDFBIN" >> $LOGFILE > >echo "Arguments: |$1|$2|$3|$4|$5|$6|" >> $LOGFILE > >echo $# $PRINTTIME >> $LOGFILE > ># case of no argument, prints available URIs > >if [ $# -eq 0 ]; then > >if [ ! -x "$PDFBIN" ]; then > >exit 0 > >fi > >echo "direct pdf \"Unknown\" \"PDF Writing\"" > >exit 0 > >fi > ># case of wrong number of arguments > >if [ $# -ne 5 -a $# -ne 6 ]; then > >echo "Usage: pdf job-id user title copies options [file]" > >exit 1 > >fi > ># get PDF directory from device URI, and check write status > >PDFDIR=${DEVICE_URI#pdf:} > >if [ ! -d "$PDFDIR" -o ! -w "$PDFDIR" ]; then > >echo "ERROR: directory $PDFDIR not writable" > >exit 1 > >fi > >echo "PDF directory: $PDFDIR" >> $LOGFILE >-- >To unsubscribe from this list go to the following URL and read the >instructions: http://lists.samba.org/mailman/listinfo/samba