chr00t
asked on
inserting inline .eps file with enscript
I'm trying to get a company logo printed inline with text via enscript and having no luck, hoping someone can help. See code below:
cat $1 |enscript -e^@epfs[c]{cheape.eps} -q -l -f Courier8 --margins=0:0:0:0 -r -p -|ps2pdf13 -|cat - > /tmp/gertest.pdf
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Any help would be greatly appreciated. If you print your *nix reports
with a logo in another manner, I'd love to hear your solutions as well.
with a logo in another manner, I'd love to hear your solutions as well.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ahh. I was going to suggest writing this directly in PostScript, but that will work as well. Per your request I am attaching the text file containing the embedded EPS directive.
The trick with enscript is getting an escape character into the text stream. Here is the view of the attached file via od:
> od -c foo.txt
0000000 \0 e p s f [ c ] { f o o b a r .
0000020 e p s } \n
0000025
Note the \0 that precedes the directive.
Pretty simple then to just cat this file along with the target text file to a pipe with the enscript command line.
cat foo.txt xxx.txt|enscript -e -vB -p - |ps2pdf13 - bar.pdf
foo.txt
The trick with enscript is getting an escape character into the text stream. Here is the view of the attached file via od:
> od -c foo.txt
0000000 \0 e p s f [ c ] { f o o b a r .
0000020 e p s } \n
0000025
Note the \0 that precedes the directive.
Pretty simple then to just cat this file along with the target text file to a pipe with the enscript command line.
cat foo.txt xxx.txt|enscript -e -vB -p - |ps2pdf13 - bar.pdf
foo.txt
ASKER
mylogo.txt