Help for this page

Select Code to Download


  1. or download this
        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.
    
  2. or download this
    sub add_font {
      my ($self, $font_name, $font_obj, $font_size) = @_;
    ...
    
      $self->current_font( $self->fonts->{$font_name} );
    }