I wrote a quick script based on the documentation from PDF::API2 and it works fine without using an intermediate file:
#!/usr/bin/env perl use strict; use warnings; use PDF::API2; # Create a blank PDF file my $pdf = PDF::API2->new(); # Add a blank page my $page = $pdf->page(); # Set the page size $page->mediabox('Letter'); # Add a built-in font to the PDF my $font = $pdf->corefont('Helvetica-Bold'); # Add some text to the page my $text = $page->text(); $text->font($font, 20); $text->translate(200, 700); $text->text('Hello World!'); # Save the PDF $pdf->saveas('new.pdf');
In reply to Re^3: Write To PDF File
by frozenwithjoy
in thread Write To PDF File
by Zoomie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |