in reply to PDF search problem
#!/usr/bin/perl use warnings; use strict; use PDF::API2; my $pdf=PDF::API2->new; my $f1=$pdf->corefont('Helvetica',1); foreach my $fn (qw( arial arialbold arialitalic arialbolditalic )) { foreach my $en (qw( latin1 macroman )) { my $font=$pdf->corefont($fn,-encode => $en); print STDERR qq($fn - $en ---\n); my $page = $pdf->page; my $txt=$page->text; $txt->translate(100,750); $txt->font($font,50); $txt->lead(50); $txt->text('Hello World !'); $txt->cr; $txt->font($font,20); $txt->text("german spec.chars: ae='ä' AE='Ä' oe='ö' "); $txt->cr; $txt->text("german spec.chars: OE='Ö' ue='ü' UE='Ü' ss='ß' "); $txt->cr; $txt->font($f1,20); $txt->text("This is font: $fn ($en)"); $txt->font($font,20); foreach my $x (0..15) { foreach my $y (0..15) { $txt->translate(50+(33*$x),50+(33*$y)); $txt->text(chr($y*16+$x)); } } } } $pdf->saveas("$0.pdf"); $pdf->end(); exit; __END__
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: PDF search problem
by stolara (Initiate) on Jul 09, 2012 at 20:30 UTC | |
by zentara (Cardinal) on Jul 09, 2012 at 21:51 UTC | |
by stolara (Initiate) on Jul 14, 2012 at 09:50 UTC | |
by zentara (Cardinal) on Jul 14, 2012 at 10:30 UTC | |
by stolara (Initiate) on Jul 17, 2012 at 19:19 UTC | |
|