Hylafax Mailing List Archives

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

[hylafax-users] faxrcvd script and PDF document page size



Hi,

When in FaxDispatch FILE TYPE is set to PDF
"FILETYPE=pdf "
then faxrcvd script converts TIFF file into PDF.
The following lines are from faxrcvd:

[ "$FILETYPE" = "pdf" ]; then
echo "Content-Type: application/pdf; name=\"c$COMMID.pdf\""
echo "Content-Description: FAX document"
echo "Content-Transfer-Encoding: $ENCODING"
echo "Content-Disposition: attachment; filename=\"c$COMMID.pdf\""
echo ""
GW=`$TIFFINFO $FILE | $GREP "Image Width" | \
$SED 's/.*Image Width: \([0-9]*\).*/\1/g' | sort -n | $SED -n '$p'`
GL=`$TIFFINFO $FILE | $GREP "Image Length" | \
$SED 's/.*Image Length: \([0-9]*\).*/\1/g' | sort -n | $SED -n '$p'`
RW=`$TIFFINFO $FILE | $GREP "Resolution" | \
$SED 's/.*Resolution: \([0-9]*\).*/\1/g' | sort -n | $SED -n '$p'`
RL=`$TIFFINFO $FILE | $GREP "Resolution" | \
$SED 's/.*Resolution: [0-9]*, \([0-9]*\).*/\1/g' | sort -n | $SED -n '$p'`
$TIFF2PS -a -O $FILE.ps $FILE 2>/dev/null # fax2ps looks bad
$PS2PDF -g$GW\x$GL -r$RW\x$RL $FILE.ps $FILE.pdf 2>/dev/null
$MIMENCODE $FILE.pdf 2>/dev/null
$RM -f $FILE.ps $FILE.pdf 2>/dev/null


It seem to me that faxrcvd determines from the TIFF the maximum image dimensions and
then creates PS and PDF files with page sizes equal to the these max. dimensions.
Now, If the fax received consists of 4 pages - 2 letter and 2 legal, then the resulting PDF file
will have 4 pages - BUT all of them legal.


Here I have 2 questions:
1. Is it possible to create multiple page PS and/or PDF documents with different page sizes
and this way to preserve the original document page sizes?
(2 letter and 2 legal format for example)


2. Is it possible to convert the one N-pages TIFF file into N PDF files?

Any ideas , any comments?

Thank you for the help in advance!

Milen




____________________ HylaFAX(tm) Users Mailing List _______________________ To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxxxxx*



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services