Re: PDF Javascript
Ben <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.pdfapi2 |
|---|---|
| Message-ID | <18760869.1186660738224.JavaMail.root@elwamui-rubis.atl.sa.earthlink.net> |
forgive me if I am not understanding what exactly you want,
but if all you need is a date inside the pdf why not do something like this
use PDF::API2;
use strict;
my $pdf = PDF::API2->new;
my $page = $pdf->page;
my $fontType = qq(Helvetica);
my %font = (
Helvetica => {
Bold => $pdf->corefont('Helvetica-Bold', -encoding => 'latin1'),
Roman => $pdf->
corefont('Helvetica', -encoding => 'latin1'),
Italic => $pdf->corefont('Helvetica-Oblique', -encoding => 'latin1'),
},
);
my $datestring = tdate();
newText($fontType, 'Bold', 14/pt, 'black', 7/mm, 270/mm, $datestring );
sub newText{
my $flashVars = $page->text;
$flashVars->font( $font{$_[0]}{$_[1]}, $_[2]
);
$flashVars->fillcolor( $_[3] );
$flashVars->translate( $_[4], $_[5] );
$flashVars->text( $_[6] );
}
sub tdate {
@_ = localtime(shift || time);
return(sprintf("%02d:%02d %02d/%02d/%04d", @_[2,1], $_[4]+1, $_[3], $_[5]+1900));
}
-----Original Message-----
From: "Mr. Shawn H. Corey"
Sent: Aug 7, 2007 6:53 PM
To: [email protected]
Subject: Re: [perl-text-pdf-modules] PDF Javascript
netarttodd wrote:
> I would like to use PDF::API2 to create a pdf that includes
> javascript. What I am trying to actually accomplish is have an
> updated print date appear at the bottom of the pdf and updated each
> time the document is printed. I think it can be done via javascript,
> but I don't know how to add the javascript code to the pdf using
> PDF::API2. Thanks for you help.
I don't remember Javascript being mentioned inside PDF. But you can look yourself at http://www.adobe.com/devnet/pdf/pdf_reference.html
--
Just my 0.00000002 million dollars worth,
Shawn
"For the things we have to learn before we can do them, we learn by doing them."
Aristotle
__._,_.___
Messages in this topic (0)
Reply (via web post) |
Start a new topic
Messages
| Polls
| Members
To unsubscribe from this group, send an email to:
perl-text-pdf-modules-unsubscribe-Km8ibD4bFueDmjp1MlKEbA@public.gmane.org
http://groups.yahoo.com/;_ylc=X3oDMTJkOWp2NWQxBF9TAzk3NDc2NTkwBGdycElkAzIwMTczODIEZ3Jwc3BJZAMxNzA1MDA3NzA5BHNlYwNmdHIEc2xrA2dmcARzdGltZQMxMTg2NjYwNzYx
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group |
Yahoo! Groups Terms of Use |
Unsubscribe
Recent Activity
-
1
New Members
Visit Your Group
SPONSORED LINKS
- Convert pdf
- Create pdf
- Pdf to dxf
- Pdf server
- Pdf creator
Yahoo! Mail
Get on board
You're invited to try
the all-new Mail Beta.
Y! Messenger
PC-to-PC calls
Call your friends
worldwide - free!
Yoga Groups
Find Enlightenment
& exchange insights
with other members
.
__,_._,___