HylaFAX The world's most advanced open source fax server

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

Re: [hylafax-users] Somewhat OT: Need to overlay data onto form prior to faxing



> 
> We did something very similar with our invoice:
> 
> 1. create a blank invoice form in postscript
> 2. convert 40 page ascii file into 40 individual postscript file
> 3. watermark the form onto each postscript invoice page
> 4. combine the postscript files back together into one big one for
> printing/faxing.
> 
> The 'wartermarking' is done in #3, using this simple little 
> perl script:
> 
> -------------
> 
> #!/usr/bin/perl
> 
> open(DOD, "$ARGV[1]");
> $flag = 0;
> while (<DOD>) {
>     if (/^%%Page:/) {
>         if ($flag) {
>             print "grestore\n";
>         }
>         $flag = 1;
>         print $_;
>         print "gsave\n";
>         #print ".99 setgray\n";
> 
>         &watermark();
> 
>         print "grestore\n";
>     } else {
>         print;
>     }
> }
> close(DOD);
> 
> sub watermark {
> 
>   open (RPT, "$ARGV[0]");
>   while (<RPT>) {
>     print $_;
>   }
>   close (RPT);
> }
> 


Very interesting!  This looks like a simple solution.  I'll give it a try.

Thanks!

JM

____________________ 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@xxxxxxxxx*




Project hosted by iFAX Solutions