in reply to Re^3: External font with PDF::API2::Simple
in thread External font with PDF::API2::Simple
The subroutine in Simple.pm that has line 435 is:my $font_obj = $pdf->pdf->ttfont('freemono.ttf'); $pdf->add_font('MonoFont',$font_obj,12); Can't call method "text" without a package or object reference at /usr +/share/perl5/PDF/API2/Simple.pm line 435.
I have been unable to see where I'm going wrong.sub add_font { my ($self, $font_name, $font_obj, $font_size) = @_; if ( $font_obj ) { LINE 435 --> $self->current_page->text->font($font_obj, $font_size); $self->fonts->{$font_name} = $font_obj; } if ( ! exists $self->fonts->{$font_name} ) { $self->fonts->{$font_name} = $self->pdf->corefont($font_name); } $self->current_font( $self->fonts->{$font_name} ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: External font with PDF::API2::Simple
by zentara (Cardinal) on Sep 21, 2011 at 14:12 UTC | |
by Iceman1 (Novice) on Sep 22, 2011 at 08:59 UTC | |
by zentara (Cardinal) on Sep 22, 2011 at 09:51 UTC | |
by Iceman1 (Novice) on Oct 17, 2011 at 03:21 UTC |