Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: PDF through perl

by Khen1950fx (Canon)
on Nov 06, 2006 at 12:05 UTC ( #582421=note: print w/replies, xml ) Need Help??


in reply to PDF through perl

Hi. Try this: use PDF::API2::Win32

Replies are listed 'Best First'.
Re^2: PDF through perl
by leelavenu (Initiate) on Nov 06, 2006 at 12:38 UTC
    Thanks for the response. Here is the code.
    use PDF::API2::Win32; $pdf = PDF::API2::Win32->new; $fnt = $pdf->corefont('Helvetica-Bold'); $page = $pdf->page; $page->mediabox('A4'); $gfx = $page->gfx; $gfx->textlabel(200,700,$fnt,20,'Hello World !'); $pdf->saveas('/this/new/document.pdf'); $pdf->end;
    Thanks. leela

    Edited (davorg): added code tags

      Did you read the PDF::API2 documentation? If you did, then why are you doing this:
      use PDF::API2::Win32; $pdf = PDF::API2::Win32->new;
      when the docs say to do this:
      use PDF::API2; $pdf = PDF::API2->new; $fnt = $pdf->corefont('Helvetica-Bold'); $page = $pdf->page; $page->mediabox('A4'); $gfx = $page->gfx; $gfx->textlabel(200,700,$fnt,20,'Hello World !'); $pdf->saveas('/this/new/document.pdf'); $pdf->end;
      jdtoronto
        I got where was wrong. Thanks for the support. leela

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://582421]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2021-11-27 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?