CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
PDF:API2 help

 



vquickl27
Novice

Nov 12, 2011, 7:59 PM

Post #1 of 1 (366 views)
PDF:API2 help Can't Post

 I am trying to modify a existing pdf document and having problems. I can modify the pdf but the text is not displaying left to right just top to bottom. I've included the pdf. my coordinates are off a little bit but i'm am not worried about that at this point. Any help would be appreciated.

<code>
#!/usr/bin/perl
use strict;
use warnings;
use PDF::API2;


my $infile = 'pn.pdf';
my $outfile = 'day_coords.pdf';

my $pdf = PDF::API2->open($infile);
my $page = $pdf->openpage('1');
my $text = $page->text();
my $font = $pdf->corefont('Helvetica');

# prepare text object
$text->font($font,16);
$text->fillcolor("#000000");
$text->translate(16,70);
$text->text("01");

$pdf->saveas($outfile);
$pdf->end;

Attachments: pn.pdf (25.9 KB)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives