#! /bin/bash
#
# bash script adds date and time of creation to the ps file; this information
# is displayed in the document summary of the pdf file accessible via
# File -> Document Properties -> Summary in the Acrobat Reader; motivation:
# hyperref cannot add this field of information in contrast to many others
# (the modification date and time could be added in the same way)
#
# copied from: S. Beuermann, Erstellung von leistungfaehigen PDF-Dokumenten 
#                            mit LATEX und den Paketen hyperref sowie thumbpdf
#
if test "$1" = ""; then 
   echo 'Usage: pdftime ps-file'
   exit 1
fi 
cdate=`date +/CreationDate' '\(D:20%y%m%d%H%M%S+00\'00\'\)` 
echo $cdate 
mv $1 $1.tmp 
sed "s|/Keywords|$cdate /Keywords|" $1.tmp > $1 
rm $1.tmp 
exit 0
