[sf-perl] "Printer Friendly" versions - PDF?
Quinn Weaver
qw at sf.pm.org
Wed Jul 20 11:40:56 PDT 2005
On Wed, Jul 20, 2005 at 08:19:32AM -0700, Garth Webb wrote:
> If all you want to do is add variable text and you have the full version
> of acrobat (the one that lets you create new documents), there is an
> easier way to create PDFs. Use acrobat to make the form look how you
> want it and then in place of where the text should go, (ie, an employees
> name) put something like #NAME#.
>
> This is unlikely to appear naturally in the PDF file and allows you to
> use the PDF as a template:
>
> $pdf_tmpl =~ s/#([A-Z]+)#/$my_values{$1}/ge;
Good hack. :)
While we're on the topic, does anyone know a good cross-platform way to
actually fire up the printer and print a document? This seems to be
one of those really platform-specific things...
--
qw (Quinn Weaver); #President, San Francisco Perl Mongers
=for information, visit http://sf.pm.org/weblog =cut
More information about the SanFrancisco-pm
mailing list