ref: 7f6ff00b80a487acc913327b33dc2e977add72f2
dir: /bin/genpdfmark/
#!/bin/rc
# generate pdfmark files for PDF metadata
# $1 is the invoice number
# assume temp files already in /tmp
rfork e
# read and construct date
dt=`{cat invoice/$1/date}
dt=`{date -u -f 'YYYYMMDDhhmmss+00''00''' $dt}
# read subject line
subject=`{cat /tmp/pre.tmp /tmp/msg.tmp | tbl | nroff -ms | sed '/^$/d' | sed 1q}
echo '[ /Author (Joel Fridolin Meyer)'
echo ' /Subject ('^$"subject^')'
echo ' /CreationDate (D:'^$dt^')'
echo ' /ModDate (D:'^$dt^')'
echo ' /DOCINFO pdfmark'