PDF-API2-Simple-1.1.4/0000755000076500007650000000000010753745077014255 5ustar cedarcedar00000000000000PDF-API2-Simple-1.1.4/examples/0000755000076500007650000000000010753745077016073 5ustar cedarcedar00000000000000PDF-API2-Simple-1.1.4/examples/01_barebones.pl0000644000076500007650000000032710753745077020672 0ustar cedarcedar00000000000000#!/usr/bin/perl BEGIN { push @INC, '../lib'; } use PDF::API2::Simple; my $pdf = PDF::API2::Simple->new( file => '01_barebones.pdf' ); $pdf->add_font( 'Verdana' ); $pdf->add_page(); $pdf->save(); PDF-API2-Simple-1.1.4/examples/02_links.pl0000644000076500007650000000122510753745077020051 0ustar cedarcedar00000000000000#!/usr/bin/perl BEGIN { push @INC, '../lib'; } use PDF::API2::Simple; my $pdf = PDF::API2::Simple->new( file => '02_links.pdf' ); $pdf->add_font('Verdana'); $pdf->add_page(); $pdf->link( 'http://search.cpan.org', 'A Hyperlink', x => ($pdf->width / 2), y => ($pdf->height / 2), align => 'left' ); $pdf->add_page(); $pdf->link( 'http://perlmonks.org', 'A fine link', x => ($pdf->width / 2), y => ($pdf->height / 2), align => 'center' ); $pdf->add_page(); $pdf->link( 'http://pause.perl.org', 'Some other link', x => ($pdf->width / 2), y => ($pdf->height / 2), align => 'right' ); $pdf->save(); PDF-API2-Simple-1.1.4/examples/03_autoflow.pl0000644000076500007650000000133610753745077020575 0ustar cedarcedar00000000000000#!/usr/bin/perl BEGIN { push @INC, '../lib'; } use PDF::API2::Simple; my $pdf = PDF::API2::Simple->new( file => '03_autoflow.pdf', line_height => 20, margin_left => 5, margin_top => 5, margin_right => 5, margin_bottom => 5 ); $pdf->add_font('VerdanaBold'); $pdf->add_font('Verdana'); $pdf->add_page(); $pdf->next_line; $pdf->text( 'Demonstrating Text', x => ($pdf->width / 2), font => 'VerdanaBold', font_size => 12, align => 'center' ); $pdf->set_font( 'Verdana' ); $pdf->next_line; $pdf->next_line; for (my $i = 0; $i < 250; $i++) { my $text = "$i - All work and no play makes Jack a dull boy"; $pdf->text($text, autoflow => 'on'); } $pdf->save(); PDF-API2-Simple-1.1.4/examples/04_headers.pl0000644000076500007650000000227510753745077020354 0ustar cedarcedar00000000000000#!/usr/bin/perl BEGIN { push @INC, '../lib'; } use PDF::API2::Simple; my $page_num = 1; my $pdf = PDF::API2::Simple->new( file => '04_headers.pdf', header => \&header, footer => \&footer ); $pdf->add_font('VerdanaBold'); $pdf->add_font('Verdana'); $pdf->add_page(); for (my $i = 0; $i < 250; $i++) { my $text = "$i - All work and no play makes Jack a dull boy"; $pdf->text( $text, x => $pdf->margin_left, autoflow => 'on' ); } $pdf->save(); sub header { my $strokecolor = $pdf->strokecolor; $pdf->stroke_color( '#0000FF' ); $pdf->next_line; $pdf->text( 'Unix time of report: ' . time() ); $pdf->y( $pdf->y - 5 ); $pdf->line( to_x => $pdf->effective_width, to_y => $pdf->y, stroke => 'on', fill => 'off', width => 2 ); $pdf->y( $pdf->height - 60 ); $pdf->strokecolor( $strokecolor ); } sub footer { my $fillcolor = $pdf->fill_color; my $font = $pdf->current_font; $pdf->fill_color( '#552F55' ); $pdf->set_font( 'VerdanaBold' ); $pdf->text( 'Page ' . $page_num++, x => $pdf->effective_width, y => 20, align => 'right' ); $pdf->fill_color( $fillcolor ); $pdf->current_font( $font ); } PDF-API2-Simple-1.1.4/examples/05_a4.pl0000644000076500007650000000052610753745077017243 0ustar cedarcedar00000000000000#!/usr/bin/perl BEGIN { push @INC, '../lib'; } use PDF::API2::Simple; my $pdf = PDF::API2::Simple->new( file => '05_a4.pdf', height => 842, width => 595, margin_top => 80 ); $pdf->add_font( 'Verdana' ); $pdf->add_page(); $pdf->text( 'This is text on an A4 pdf', x => 50, y => $pdf->height - 50 ); $pdf->save(); PDF-API2-Simple-1.1.4/examples/06_alignment.pl0000644000076500007650000001374710753745077020727 0ustar cedarcedar00000000000000 #!/usr/bin/perl BEGIN { push @INC, '../lib'; } use PDF::API2::Simple; my $pdf = PDF::API2::Simple->new( file => '06_alignment.pdf' ); $pdf->add_font('Verdana'); $pdf->add_page(); # left align { my $y = $pdf->height - 50; # autoflow off $pdf->text( 'Please align me left', x => $pdf->margin_left, y => $y, align => 'left', autoflow => 'off' ); # autoflow on $y -= 50; $pdf->text( 'Please align me left, Please align me left. Please align me left, Please align me left. Please align me left, Please align me left. ' . 'Please align me left, Please align me left. Please align me left, Please align me left. Please align me left, Please align me left. ' . 'Please align me left, Please align me left. Please align me left, Please align me left. Please align me left, Please align me left. ' . 'Please align me left, Please align me left. Please align me left, Please align me left. Please align me left, Please align me left.', x => $pdf->margin_left, y => $y, align => 'left', autoflow => 'on' ); $y -= 150; $pdf->text( 'Please align me left, Please align me left. Please align me left, Please align me left. Please align me left, Please align me left. ' . 'Please align me left, Please align me left. Please align me left, Please align me left. Please align me left, Please align me left. ' . 'Please align me left, Please align me left. Please align me left, Please align me left. Please align me left, Please align me left.', x => $pdf->margin_left + 100, y => $y, align => 'left', autoflow => 'on' ); $y -= 150; $pdf->text( 'Please align me left, Please align me left. Please align me left, Please align me left. Please align me left, Please align me left. ' . 'Please align me left, Please align me left. Please align me left, Please align me left. Please align me left, Please align me left.', x => $pdf->margin_left + 50, y => $y, align => 'left', autoflow => 'on' ); } $pdf->add_page(); # center align { my $y = $pdf->height - 50; my $x = ($pdf->width / 2); # autoflow off $pdf->text( 'Please align me center', x => $x, y => $y, align => 'center', autoflow => 'off' ); # autoflow on $y -= 50; $pdf->text( 'Please align me center, Please align me center. Please align me center, Please align me center. Please align me center, Please align me center.' . 'Please align me center, Please align me center. Please align me center, Please align me center. Please align me center, Please align me center.' . 'Please align me center, Please align me center. Please align me center, Please align me center. Please align me center, Please align me center.' . 'Please align me center, Please align me center. Please align me center, Please align me center. Please align me center, Please align me center.', x => $x, y => $y, align => 'center', autoflow => 'on' ); $y -= 150; $pdf->text( 'Please align me center, Please align me center. Please align me center, Please align me center. Please align me center, Please align me center.' . 'Please align me center, Please align me center. Please align me center, Please align me center. Please align me center, Please align me center.' . 'Please align me center, Please align me center. Please align me center, Please align me center. Please align me center, Please align me center.', x => $x + 150, y => $y, align => 'center', autoflow => 'on' ); $y -= 150; $pdf->text( 'Please align me center, Please align me center. Please align me center, Please align me center. Please align me center, Please align me center.' . 'Please align me center, Please align me center. Please align me center, Please align me center. Please align me center, Please align me center.', x => $x - 150, y => $y, align => 'center', autoflow => 'on' ); } $pdf->add_page(); # right align { my $y = $pdf->height - 50; # autoflow off $pdf->text( 'Please align me right', x => $pdf->width_right, y => $y, align => 'right', autoflow => 'off' ); # autoflow on $y -= 50; $pdf->text( 'Please align me right, Please align me right. Please align me right, Please align me right. Please align me right, Please align me right.' . 'Please align me right, Please align me right. Please align me right, Please align me right. Please align me right, Please align me right.' . 'Please align me right, Please align me right. Please align me right, Please align me right. Please align me right, Please align me right.' . 'Please align me right, Please align me right. Please align me right, Please align me right. Please align me right, Please align me right.', x => $pdf->width_right, y => $y, align => 'right', autoflow => 'on' ); $y -= 150; $pdf->text( 'Please align me right, Please align me right. Please align me right, Please align me right. Please align me right, Please align me right.' . 'Please align me right, Please align me right. Please align me right, Please align me right. Please align me right, Please align me right.' . 'Please align me right, Please align me right. Please align me right, Please align me right. Please align me right, Please align me right.', x => $pdf->width_right - 150, y => $y, align => 'right', autoflow => 'on' ); $y -= 150; $pdf->text( 'Please align me right, Please align me right. Please align me right, Please align me right. Please align me right, Please align me right.' . 'Please align me right, Please align me right. Please align me right, Please align me right. Please align me right, Please align me right.', x => $pdf->width_right - 50, y => $y, align => 'right', autoflow => 'on' ); } $pdf->save(); PDF-API2-Simple-1.1.4/examples/07_as_string.pl0000644000076500007650000000035210753745077020727 0ustar cedarcedar00000000000000#!/usr/bin/perl BEGIN { push @INC, '../lib'; } use PDF::API2::Simple; my $pdf = PDF::API2::Simple->new( ); $pdf->add_font( 'Verdana' ); $pdf->add_page(); $pdf->text( 'This PDF is printed to STDOUT!' ); print $pdf->stringify(); PDF-API2-Simple-1.1.4/INSTALL0000644000076500007650000000007410753745077015307 0ustar cedarcedar00000000000000use CPAN. Should be an easy build, as the tests are limited.PDF-API2-Simple-1.1.4/lib/0000755000076500007650000000000010753745077015023 5ustar cedarcedar00000000000000PDF-API2-Simple-1.1.4/lib/PDF/0000755000076500007650000000000010753745077015434 5ustar cedarcedar00000000000000PDF-API2-Simple-1.1.4/lib/PDF/API2/0000755000076500007650000000000010753745077016127 5ustar cedarcedar00000000000000PDF-API2-Simple-1.1.4/lib/PDF/API2/Simple.pm0000644000076500007650000007377710753745077017743 0ustar cedarcedar00000000000000package PDF::API2::Simple; =head1 NAME PDF::API2::Simple - Simplistic wrapper for the excellent PDF::API2 modules =head1 SYNOPSIS use PDF::API2::Simple; my $pdf = PDF::API2::Simple->new( file => 'output.pdf' ); $pdf->add_font('VerdanaBold'); $pdf->add_font('Verdana'); $pdf->add_page(); $pdf->link( 'http://search.cpan.org', 'A Hyperlink', x => 350, y => $pdf->height - 150 ); for (my $i = 0; $i < 250; $i++) { my $text = "$i - All work and no play makes Jack a dull boy"; $pdf->text($text, autoflow => 'on'); } $pdf->save(); Take note that PDF coordinates are not quite what you're used to. The coordinate, (0, 0) for instance is at the lower-left hand corner. Thus, x still grows to the right, but y grows towards the top. =head1 METHODS =cut $VERSION = '1.1.4'; use strict; use PDF::API2; require Exporter; require Carp; our @ISA = qw(Exporter); =head2 new PDF::API2::Simple->new( 'file' => 'output.txt', 'width' => 612, 'height' => 792, 'line_height' => 10, 'margin_left' => 20, 'margin_top' => 20, 'margin_right' => 20, 'margin_bottom' => 50, 'width_right' => 0, 'height_bottom' => 0, 'effective_width' => 0, 'effective_height' => 0, 'header' => undef, 'footer' => undef, ); Creates a new PDF::API2::Simple instance. A good strategy is to create a new object for each pdf file you want to create. That is, of course, up to you. =over =item * file - The PDF file you want to write to. No default, parameter required =item * width - The width of the PDF file. Defaults to 612, the 8 1/2 x 11 US Letter width =item * height - The height of the PDF file. Defaults to 792, the 8 1/2 x 11 US Letter height =item * line_height - The standard height you want to define for lines. The default is 10 =item * margin_left - The amount of margin space you want on the left side. Of course, you can specify whatever coordniates you want. Default is 20 =item * margin_top - The amount of margin space you want on the top of each page. Default is 20 =item * margin_right - The amount of margin space you want of the right side of each page. Default is 20 =item * margin_bottom - The amount of margin space you want on the bottom of each page. Default is 50 =item * width_right - A convenience property that contains the furthest I of the page, accounting for the margins specified =item * height_bottom - A convenience property that contains the largest C of the page, accounting for the bottom margin =item * effective_width - A convenience property that contains the width of the page, after the left and right margin have been accounted for =item * effective_height - A convenience property that contains the height of the page, after the top and bottom margin have been accounted for =item * header - This C reference will be called everytime a page is appended to the PDF, allowing you to specifiy a header for your pages =item * footer - This C reference will be called everytime a page is ended, allowing you to specifiy a footer for your pages =back =cut sub new { my ($self, %opts) = @_; $self = bless { 'file' => $opts{'file'} || undef, 'width' => $opts{'width'} || 612, 'height' => $opts{'height'} || 792, 'line_height' => exists $opts{'line_height'} ? $opts{'line_height'} : 10, 'margin_left' => exists $opts{'margin_left'} ? $opts{'margin_left'} : 20, 'margin_top' => exists $opts{'margin_top'} ? $opts{'margin_top'} : 20, 'margin_right' => exists $opts{'margin_right'} ? $opts{'margin_right'} : 20, 'margin_bottom' => exists $opts{'margin_bottom'} ? $opts{'margin_bottom'} : 50, 'width_right' => 0, 'height_bottom' => 0, 'effective_width' => 0, 'effective_height' => 0, 'header' => $opts{'header'} || undef, 'footer' => $opts{'footer'} || undef, '_pdf' => PDF::API2->new( '-file' => $opts{'file'} ), '_fonts' => { }, '_x' => 0, '_y' => 0, '_current_page' => 0, '_current_font' => undef, '_current_font_size' => 10, '_current_stroke_color' => 'black', '_current_fill_color' => 'black' }, $self; $self->{'_pdf'}->mediabox( $self->{'width'}, $self->{'height'} ); $self->_set_relative_values(); $self->_reset_x_and_y(); return $self; } # private methods # ================================================ sub _reset_x_and_y { my $self = shift; $self->{'_x'} = $self->margin_left; $self->{'_y'} = ($self->height - $self->margin_top); } sub _set_relative_values { my $self = shift; $self->{'width_right'} = $self->width - $self->margin_right; $self->{'height_bottom'} = $self->height - $self->margin_bottom; $self->{'effective_width'} = ($self->width - ($self->margin_left + $self->margin_right)); $self->{'effective_height'} = ($self->height - ($self->margin_top + $self->margin_bottom)); } sub _add_page_if_exceeds_bounds { my ($self, $theoretical_y) = @_; if ($self->would_extend_page( $theoretical_y )) { $self->add_page(); return 1; } return 0; } sub _get_text_object_for_current_page { my ($self, %opts) = @_; my $font = ((exists $opts{'font'} && $opts{'font'}) ? $self->fonts->{$opts{'font'}} : $self->current_font); my $font_size = $opts{'font_size'} || $opts{'fontsize'} || $self->current_font_size; my $stroke_color = $opts{'stroke_color'} || $opts{'strokecolor'} || $self->current_stroke_color; my $fill_color = $opts{'fill_color'} || $opts{'fillcolor'} || $self->current_fill_color; my $text_obj = $self->current_page->text(); $self->current_font( $font ); $self->current_font_size( $font_size ); $self->current_stroke_color( $stroke_color ); $self->current_fill_color( $fill_color ); $text_obj->font( $font, $font_size ); $text_obj->strokecolor( $stroke_color ); $text_obj->fillcolor( $fill_color ); return $text_obj; } sub _render_text_at { my ($self, $text_obj, $text, $x, $y, $align) = @_; $text_obj->translate( $x, $y ); if (lc $align eq 'center') { my $width = $text_obj->text_center( $text ); if (wantarray) { my $half_w = $width / 2; my $rect_x = $x - $half_w; my $rect_x_to = $x + $half_w; return ( $rect_x, $y, $rect_x_to, $y + $self->current_font_size ); } return $width; } if (lc $align eq 'right') { my $width = $text_obj->text_right( $text ); if (wantarray) { my $rect_x = $x - $width; my $rect_x_to = $x; return ( $rect_x, $y, $rect_x_to, $y + $self->current_font_size ); } return $width; } if (wantarray) { my $width = $text_obj->text( $text ); my $rect_x = $x; my $rect_x_to = $x + $width; return ( $rect_x, $y, $rect_x_to, $y + $self->current_font_size ); } else { return $text_obj->text( $text ); } } sub _standard_content_opts { my ($self, $content, %opts) = @_; my $stroke_color = $opts{'stroke_color'} || $opts{'strokecolor'} || $self->current_stroke_color; my $fill_color = $opts{'fill_color'} || $opts{'fillcolor'} || $self->current_fill_color; my $width = $opts{'width'} || 0.5; $content->strokecolor( $stroke_color ); $content->fillcolor( $fill_color ); $content->linewidth( $width ); } sub _render_content { my ($self, $content, %opts) = @_; my $stroke = lc $opts{'stroke'}; my $fill = lc $opts{'fill'}; $stroke = 'on' if (($stroke eq 'yes') || ($stroke eq 'true')); $fill = 'on' if (($fill eq 'yes') || ($fill eq 'true')); if ((!$stroke && !$fill) || (($stroke eq 'off') && ($fill eq 'off'))) { $fill = 'on'; # default to fill, not stroke } if ((lc $stroke eq 'on') && (lc $fill eq 'on')) { $content->fillstroke(); } elsif (lc $fill eq 'on') { $content->fill(); } elsif (lc $stroke eq 'on') { $content->stroke(); } } sub _limit_text { my ($self, $text, $limit) = @_; my @chars; my $index; return $text if (length($text) <= $limit); @chars = split //, $text; $index = int(scalar(@chars) * 0.75); Carp::croak( "Limit must be > than 5" ) if ($limit < 5); $text = join '', @chars; while (scalar(@chars) > $limit) { splice(@chars, $index--, 1); last if ($index < 0); } $text = join '', @chars; substr($text, $index, 3) = '...'; return $text; } =head2 open PDF::API2::Simple->open( 'open_file' => 'my_pdf.pdf', 'open_page' => 1, # Default is 1. # Any other options to new. ); This method opens an existing PDF for editing. You can include any other arguments that are valid for C and they will be set in the resulting object. =cut sub open { my ($self, %opts) = @_; die 'Must provide an open_file param for open' unless $opts{'open_file'}; # Default to 1; my $page_num = exists $opts{open_page} ? $opts{open_page} : 1; my $base_pdf = PDF::API2->open($opts{open_file}); my $page = $base_pdf->openpage($page_num); my $pdf = PDF::API2::Simple->new(%opts); $pdf->pdf($base_pdf); $pdf->current_page($page); return $pdf; } # public methods - space management # ================================================ =head2 Space Management The following methods help you to manage the space on each page of your PDF. =head3 next_line_would_extend_page Returns a true value if the current C minus C would write past the bottom margin. =cut sub next_line_would_extend_page { my $self = shift; return $self->would_extend_page( $self->y - $self->line_height ); } =head3 would_extend_page C Returns a true value if the C would write past the bottom margin. =cut sub would_extend_page { my ($self, $theoretical_y) = @_; return ($theoretical_y < $self->margin_bottom); } =head3 next_line Reduces the current C by C. =cut sub next_line { my $self = shift; $self->{'_y'} -= $self->line_height; } =head3 add_page Closes the current page, resets the C and C values to thier default coordinates, and calls the header callback, if specified. This method may be called for in, such as if your autoflow text wraps over a page. =cut sub add_page { my $self = shift; if ($self->current_page) { $self->end_page(); } $self->current_page( $self->pdf->page() ); $self->_reset_x_and_y(); if ($self->header) { $self->header->( $self ); } } =head3 end_page Closes the current page, and calls the footer callback, if specified. This method is usually called for you. =cut sub end_page { my $self = shift; if ($self->footer) { $self->footer->( $self ); } } # public methods - general mangement # ================================================ =head2 General Management These methods help you manage the PDF itself =head3 add_font C This method will add a font to be used throughout the PDF. You C call this at least once before laying out your PDF. C is a font name, such as 'Arial', or 'Verdana'. Appending 'Bold' seems to make the text bold, as in 'VerdanaBold'. Refer to L for more details. You can optionally pass a font object and font size if you have loaded an external font. my $font_obj = $pdf->pdf->ttfont('new_font.ttf'); $pdf->add_font('NewFont', $font_obj, '12'); Refer to L for the various font methods, like C, available. =cut sub add_font { my ($self, $font_name, $font_obj, $font_size) = @_; if ( $font_obj ) { $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} ); } =head3 set_font C[, C] Set the current font by name, and optionally a font size. =cut sub set_font { my ($self, $font_name, $pt) = @_; $self->current_font( $self->fonts->{$font_name} ); if ($pt && ($pt > 0)) { $self->current_font_size( $pt ); } } =head3 as_string An alias for the stringify method =cut sub as_string { stringify( @_ ); } =head3 stringify Ends the current page, and returns the pdf as a string =cut sub stringify { my $self = shift; $self->end_page(); $self->{'_pdf'}->stringify; } sub save_as { save( @_ ); } sub saveas { save( @_ ); } =head3 save [C] End the current page, and save the document to the file argument, or the file specified when instaniating the object. If not suitable file can be found to save in, a C is emitted. Aliases for this method are C and C. =cut sub save { my ($self, $file) = @_; $self->file( $file ) if ($file); if ( ! $self->file ) { Carp::croak( "No file specified" ); } $self->end_page(); $self->{'_pdf'}->saveas( $self->file ); } # public methods - layout # ================================================ =head2 Layout These methods modify the actual layout of the PDF. Note that most of these methods set some internal state. Most often, the last C and C are set after the rendered object. Most times, underscores may be stripped and the arguments will still work, such as is the difference between C, and C. =head3 popup C[, C<%opts>] Creates a 25x25 box at C (or the current C), C (or the current C) to represent an annotation at that point. The user may then click that icon for a full annotation. =cut sub popup { my ($self, $text, %opts) = @_; my $x = exists $opts{'x'} ? $opts{'x'} : $self->x; my $y = exists $opts{'y'} ? $opts{'y'} : $self->y; my $annotation = $self->current_page->annotation; $annotation->rect( $x, $y, $x + 25, $y + 25 ); $annotation->text( $text ); } =head3 url This is an alias for the C method. =cut sub url { my $self = shift; return $self->link( @_ ); } =head3 link C, C[, C<%opts>] Specifies a link to C, having C. C<%opts> may contain: =over =item * C - The x position of the link. Defaults to C. =item * C - The y position of the link. Defaults to C. =item * C - The amount to "limit" the text. This will add an ellipis (...) a few characters from the end if the text length is greater than this numerical value. Defaults to 0, which is to mean "do not limit". =item * C - Which alignment you want for your text. The choices are 'left', 'center', and 'right'. Defaults to 'left'. =item * C - Specifies via font name, the font to use. This sets the current font. =item * C - Specifies the font size. This sets the current font size. =item * C - Specifies the fill color. This sets the current fill color. =item * C - Specifies the stroke color. This sets the current stroke color. =back This method returns the width of the text. =cut sub link { my ($self, $url, $text, %opts) = @_; my $x = exists $opts{'x'} ? $opts{'x'} : $self->x; my $y = exists $opts{'y'} ? $opts{'y'} : $self->y; my $limit = $opts{'limit'} || 0; my $align = $opts{'align'} || 'left'; my $text_obj = $self->_get_text_object_for_current_page( %opts ); my @rect; my $annotation; $text = $self->_limit_text( $text, $limit ) if ($limit); @rect = $self->_render_text_at( $text_obj, $text, $x, $y, $align ); $annotation = $self->current_page->annotation; $annotation->rect( @rect ); $annotation->url( $url ); # return text width return ($rect[2] - $rect[0]); } =head3 text C[, C<%opts>] Renders text onto the PDF. =over =item * C - The x position of the link. Defaults to C. =item * C - The y position of the link. Defaults to C. =item * C - The amount to "limit" the text. This will add an ellipis (...) a few characters from the end if the text length is greater than this numerical value. Defaults to 0, which is to mean "do not limit". =item * C - Which alignment you want for your text. The choices are 'left', 'center', and 'right'. Defaults to 'left'. =item * C - Any value but 'off' will notify this method to use "autoflowing" heuristics to gracefully wrap your text over lines and pages. Useful for variable length text. Note that due to laziness, this option is mutually exclusive with C. =item * C - Specifies via font name, the font to use. This sets the current font. =item * C - Specifies the font size. This sets the current font size. =item * C - Specifies the fill color. This sets the current fill color. =item * C - Specifies the stroke color. This sets the current stroke color. =back If C was B specified, this method returns the width of the text in scalar context, the bounding box of the text in list context. In autoflow mode, this method returns nothing. =cut sub text { my ($self, $text, %opts) = @_; my $x = exists $opts{'x'} ? $opts{'x'} : $self->x; my $y = exists $opts{'y'} ? $opts{'y'} : $self->y; my $limit = $opts{'limit'} || 0; my $align = $opts{'align'} || 'left'; my $autoflow = $opts{'autoflow'} || 'off'; my $text_obj = $self->_get_text_object_for_current_page( %opts ); my @words; my $org_x; my $sentance; # don't get fancy. just render. if (lc $autoflow eq 'off') { $text = $self->_limit_text( $text, $limit ) if ($limit); return $self->_render_text_at( $text_obj, $text, $x, $y, $align ); } Carp::croak( "May not use limit when autoflow is on!" ) if ($limit); $org_x = $x; @words = split /\s/, $text; for (my $i = 0; $i < scalar(@words); $i++) { my $word = $words[$i]; my $width; my $flush = 0; if (($i + 1) <= scalar(@words)) { $word .= ' '; } $width = $text_obj->advancewidth( $word ); if ( $align eq 'center' ) { my $delta = abs($org_x - ($x + ($width / 2))); my ($left, $right) = (($org_x - $delta), ($org_x + $delta)); $flush = (($left < $self->margin_left) || ($right > $self->width_right)); } elsif ( $align eq 'right' ) { $flush = (($x - $width) < $self->margin_left); } else { $flush = (($x + $width) > $self->effective_width + $self->margin_left); } if ( $flush ) { $self->_render_text_at( $text_obj, $sentance, $org_x, $y, $align ); $sentance = ''; $x = $org_x; $y -= $self->line_height; } if ($self->_add_page_if_exceeds_bounds( $y )) { $x = $org_x; $y = $self->y; $text_obj = $self->_get_text_object_for_current_page( %opts ); } $sentance .= $word; if ( $align eq 'center' ) { $x += ($width / 2); } elsif ( $align eq 'right' ) { $x -= $width; } else { $x += $width; } } $self->_render_text_at( $text_obj, $sentance, $org_x, $y, $align ); $y -= $self->line_height; if (!$self->_add_page_if_exceeds_bounds( $y )) { $self->y( $y ); } } =head3 image C[, C<%opts>] Renders an image onto the PDF. The following image types are supported: JPG, TIFF, PNM, PNG, GIF, and PDF. Note that the module determines the image type by file extension. =over =item * C - The x position of the link. Defaults to C. =item * C - The y position of the link. Defaults to C. =item * C - The width of the image. Defaults to 100. =item * C - The height of the image. Defaults to 100. =item * C - Amount to scale the image. Defaults to 1. (only available for PDF types) =back =cut sub image { my ($self, $src, %opts) = @_; my $x = exists $opts{'x'} ? $opts{'x'} : $self->x; my $y = exists $opts{'y'} ? $opts{'y'} : $self->y; my $width = $opts{'width'} || 100; my $height = $opts{'height'} || 100; my $scale = $opts{'scale'} || 1; my $image = $self->current_page->gfx; my $data; local $_ = $src; if (m/[.]jp(?:e)?g$/i) { $data = $self->pdf->image_jpeg( $_ ); } elsif (m/[.]tif(?:f)?$/i) { $data = $self->pdf->image_tiff( $_ ); } elsif (m/[.]pnm$/i) { $data = $self->pdf->image_pnm( $_ ); } elsif (m/[.]png$/i) { $data = $self->pdf->image_png( $_ ); } elsif (m/[.]gif$/i) { $data = $self->pdf->image_gif( $_ ); } elsif (m/[.]pdf$/i) { my $p = PDF::API2->open( $_ ); my $xo = $self->pdf->importPageIntoForm($p, 1); $self->current_page->gfx->formimage($xo, $x, $y, $scale); $self->x( $x ); $self->y( $y ); return; } else { Carp::croak("Cannot ascertain image type of $src\n"); } $image->image($data, $x, $y, $width, $height); $self->x( $x + $width ); $self->y( $y ); } =head3 line [, C<%opts>] Renders a line onto the PDF. =over =item * C - The x position of the line. Defaults to C. =item * C - The y position of the line. Defaults to C. =item * C - The x position where to draw the line to. =item * C - The y position where to draw the line to. =item * C - Specifies the fill color. This sets the current fill color. Defaults to C. =item * C - Specifies the stroke color. This sets the current stroke color. Defaults to C. =item * C - Specifies the width of the line. Defaults to 0.5. =back =cut sub line { my ($self, %opts) = @_; my $x = exists $opts{'x'} ? $opts{'x'} : $self->x; my $y = exists $opts{'y'} ? $opts{'y'} : $self->y; my $to_x = $opts{'to_x'}; my $to_y = $opts{'to_y'}; my $line = $self->current_page->gfx; $self->_standard_content_opts( $line, %opts ); $line->move( $x, $y ); $line->line( $to_x, $to_y ); $self->_render_content( $line, %opts ); $self->x( $to_x ); $self->y( $to_y ); } =head3 rect [, C<%opts>] Renders a rectangle onto the PDF. Rectangles are usually drawn specifying two coordinates diagonal from each other. (5, 5) to (30, 30) for example, would produce a 25 x 25 square. =over =item * C - The x position of the rect. Defaults to C. =item * C - The y position of the rect. Defaults to C. =item * C - The x position where to draw the rect to. =item * C - The y position where to draw the rect to. =item * C - A value of 'on', 'true', or 'yes' will enable the stroke. Defaults to 'on'. =item * C - A value of 'on', 'true', or 'yes' will enable the fill. Defaults to 'off'. =item * C - Specifies the fill color. This sets the current fill color. Defaults to C. =item * C - Specifies the stroke color. This sets the current stroke color. Defaults to C. =item * C - Specifies the width of the line. Defaults to 0.5. =back =cut sub rect { my ($self, %opts) = @_; my $x = exists $opts{'x'} ? $opts{'x'} : $self->x; my $y = exists $opts{'y'} ? $opts{'y'} : $self->y; my $to_x = $opts{'to_x'}; my $to_y = $opts{'to_y'}; my $stroke = $opts{'stroke'} || 'on'; my $fill = $opts{'fill'} || 'off'; my $rect = $self->current_page->gfx; $self->_standard_content_opts( $rect, %opts ); $rect->rectxy( $x, $y, $to_x, $to_y ); $self->_render_content( $rect, %opts ); $self->x( $to_x ); $self->y( $to_y ); } # properties # ================================================ =head1 PROPERTIES The following properties are read/write, and may be used as $pdf->prop to read, $pdf->prop('val') to set. =head2 header Gets/sets the header callback. =cut sub header { my $self = shift; if (@_) { $self->{'header'} = shift; } return $self->{'header'}; } =head2 footer Gets/sets the footer callback. =cut sub footer { my $self = shift; if (@_) { $self->{'footer'} = shift; } return $self->{'footer'}; } =head2 file Gets/sets the file used to save the PDF. It's recommended that you B. =cut sub file { my $self = shift; if (@_) { $self->{'file'} = shift; } return $self->{'file'}; } =head2 width Gets/sets the width of the current page. It's recommended that you B. =cut sub width { my $self = shift; if (@_) { $self->{'width'} = shift; $self->_set_relative_values(); } return $self->{'width'}; } =head2 height Gets/sets the height of the current page. It's recommended that you B. =cut sub height { my $self = shift; if (@_) { $self->{'height'} = shift; $self->_set_relative_values(); } return $self->{'height'}; } =head2 line_height Gets/sets the default line height. This is used in most space layout methods. =cut sub line_height { my $self = shift; if (@_) { $self->{'line_height'} = shift; } return $self->{'line_height'}; } =head2 margin_left Gets/sets the left margin. =cut sub margin_left { my $self = shift; if (@_) { $self->{'margin_left'} = shift; $self->_set_relative_values(); $self->_reset_x_and_y(); } return $self->{'margin_left'}; } =head2 margin_top Gets/sets the top margin. =cut sub margin_top { my $self = shift; if (@_) { $self->{'margin_top'} = shift; $self->_set_relative_values(); $self->_reset_x_and_y(); } return $self->{'margin_top'}; } =head2 margin_right Gets/sets the right margin. =cut sub margin_right { my $self = shift; if (@_) { $self->{'margin_right'} = shift; $self->_set_relative_values(); } return $self->{'margin_right'}; } =head2 margin_bottom Gets/sets the bottom margin. =cut sub margin_bottom { my $self = shift; if (@_) { $self->{'margin_bottom'} = shift; $self->_set_relative_values(); } return $self->{'margin_bottom'}; } =head2 width_right Gets/sets the calculated value, C - C =cut sub width_right { my $self = shift; if (@_) { $self->{'width_right'} = shift; } return $self->{'width_right'}; } =head2 height_bottom Gets/sets the calculated value, C - C =cut sub height_bottom { my $self = shift; if (@_) { $self->{'height_bottom'} = shift; } return $self->{'height_bottom'}; } =head2 effective_width Gets/sets the calculated value, C - (C + C) =cut sub effective_width { my $self = shift; if (@_) { $self->{'effective_width'} = shift; } return $self->{'effective_width'}; } =head2 effective_height Gets/sets the calculated value, C - (C + C) =cut sub effective_height { my $self = shift; if (@_) { $self->{'effective_height'} = shift; } return $self->{'effective_height'}; } =head2 current_page Gets/sets the current page object. It's hard to find a good reason to set this, but it is possible to do so. =cut sub current_page { my $self = shift; if (@_) { $self->{'_current_page'} = shift; } return $self->{'_current_page'}; } =head2 pdf Gets/sets the raw L object. This allows you great flexibility in your applications. =cut sub pdf { my $self = shift; if (@_) { $self->{'_pdf'} = shift; } return $self->{'_pdf'}; } =head2 fonts Gets/sets the array of fonts we have been storing via the C method. =cut sub fonts { my $self = shift; if (@_) { $self->{'_fonts'} = shift; } return $self->{'_fonts'}; } =head2 current_font Gets/sets the current font. =cut sub current_font { my $self = shift; if (@_) { $self->{'_current_font'} = shift; if (@_) { $self->current_font_size( shift ); } } return $self->{'_current_font'}; } =head2 current_font_size Gets/sets the current font size. =cut sub current_font_size { my $self = shift; if (@_) { $self->{'_current_font_size'} = shift; } return $self->{'_current_font_size'}; } =head2 current_stroke_color Gets/sets the current stroke color. Aliases for this method are C, and C =cut sub stroke_color { return current_stroke_color( @_ ); } sub strokecolor { return current_stroke_color( @_ ); } sub current_stroke_color { my $self = shift; if (@_) { $self->{'_current_stroke_color'} = shift; } return $self->{'_current_stroke_color'}; } =head2 current_fill_color Gets/sets the current fill color. Aliases for this method are C, C, C, C, and C. =cut sub fontcolor { return current_fill_color( @_ ); } sub set_font_color { return current_fill_color( @_ ); } sub font_color { return current_fill_color( @_ ); } sub fill_color { return current_fill_color( @_ ); } sub fillcolor { return current_fill_color( @_ ); } sub current_fill_color { my $self = shift; if (@_) { $self->{'_current_fill_color'} = shift; } return $self->{'_current_fill_color'}; } =head2 x Gets/sets the current x position. =cut sub x { my $self = shift; if (@_) { $self->{'_x'} = shift; } return $self->{'_x'}; } =head2 y Gets/sets the current y position. =cut sub y { # } sub emacs-hack { my $self = shift; if (@_) { $self->{'_y'} = shift; } return $self->{'_y'}; } =head1 BUGS / FIXES Please mail all bug reports, fixes, improvements, and suggestions to bugs -at- redtreesystems -dot- com. =head1 PLUG AND LICENSE This project belongs to Red Tree Systems, LLC - L, but is placed into the public domain in the hopes that it will be educational and/or useful. Red Tree Systems, LLC requests that this section be kept intact with any modification of this module, or derivitive work thereof. =head1 THANKS Thanks to Jim Brandt for noting that the default values didn't do well with false values. Thanks to Denis Evdokimov for submitting more margin-fixing goodness. Thanks to Jonathan A. Marshall for fixing a long standing margin issue, and pointing out further documentation shortcomings. Thanks to Jim Brandt for the open method, contributing code to add_font, and offering beer. Thanks to Pradeep N Menon and Alfred Reibenschuh for pointing out optimizaiton issues, and helping to resolve them. Thanks to Simon Wistow for uncovering several bugs and offering up code. Thanks to Bryan Krone for pointing out our documentation shortcomings. =head1 SEE ALSO L There is an examples folder with this dist that should help you get started. You may contact pdfapi2simple -AT- redtreesystems _dot_ com for support on an individual or commercial basis. =cut 1; PDF-API2-Simple-1.1.4/Makefile.PL0000644000076500007650000000045410753745077016232 0ustar cedarcedar00000000000000use inc::Module::Install; name 'PDF-API2-Simple'; all_from 'lib/PDF/API2/Simple.pm'; author 'Red Tree Systems, LLC'; license 'public domain'; no_index directory => 'examples'; requires 'Carp' => 0; requires 'PDF::API2' => 0; auto_install; WriteAll; PDF-API2-Simple-1.1.4/MANIFEST0000644000076500007650000000023610753745077015407 0ustar cedarcedar00000000000000Makefile.PL MANIFEST INSTALL README lib/PDF/API2/Simple.pm examples/01_barebones.pl examples/02_links.pl examples/03_autoflow.pl examples/04_headers.pl t/01.tPDF-API2-Simple-1.1.4/README0000644000076500007650000000044110753745077015134 0ustar cedarcedar00000000000000PDF::API2::Simple is a wrapper around the excellent PDF::API2 series of modules. This module is simply a simplification of those modules, and has been known to greatly reduce production time. This module is in the public domain, with a plea of notification. Please see the POD for details.PDF-API2-Simple-1.1.4/t/0000755000076500007650000000000010753745077014520 5ustar cedarcedar00000000000000PDF-API2-Simple-1.1.4/t/01.t0000644000076500007650000000012210753745077015120 0ustar cedarcedar00000000000000use Test::More tests => 2; require_ok (PDF::API2); use_ok (PDF::API2::Simple); PDF-API2-Simple-1.1.4/t/02_open.t0000644000076500007650000000113410753745077016146 0ustar cedarcedar00000000000000use Test::More tests => 8; use_ok(PDF::API2::Simple); eval{ PDF::API2::Simple->open(); }; ok( $@, 'Caught missing open_file.'); like( $@, qr/Must provide an open_file param for open/, 'Correct error message.'); my $pdf = PDF::API2::Simple->open( open_file => 't/files/test.pdf', open_page => 2, file => 't/files/outfile.pdf', ); ok( $pdf, 'Got a pdf object back.' ); ok( $pdf->add_font('Arial'), 'Added a font.'); ok( $pdf->text('some text'), 'Added some text.'); $pdf->save(); ok( (-e 't/files/outfile.pdf'), 'File created.'); ok( (unlink 't/files/outfile.pdf'), 'File removed.'); PDF-API2-Simple-1.1.4/t/files/0000755000076500007650000000000010753745077015622 5ustar cedarcedar00000000000000PDF-API2-Simple-1.1.4/t/files/test.pdf0000644000076500007650000005473510753745077017312 0ustar cedarcedar00000000000000%PDF-1.3 % 2 0 obj << /Length 4 0 R /Filter /FlateDecode >> stream xڵKo@+Fjwnm"%)gj6$yGog]~{x%g) < .3OA&v aZ-|"9-)|k :@.o0y>ލ~fp}X_@:uQ*A2Dh}IAylɲ! !HhCfTЬ&mxZLnI$DF!.ZN˒ק"_MHDL,GBD$Ƙ0ì>LɶeFRv46ʻ +%[ICR J&doyN\sbpBiq嵘PZyމ)˘eɵau6BX_Zl0>O2vO,YγV?+{#Éfd'W#d|KhX+mOERlk®K-M^UMI)MuQ*{dLgy%Xf`qdE> ]I$i$O[&y0ӚK⒇\$<)$O9&y0SeݶY '(ͻ;Xuw(ET-MNZ.+j-M+?+ endstream endobj 4 0 obj 719 endobj 1 0 obj << /Type /Page /Parent 9 0 R /Resources 3 0 R /Contents 2 0 R /MediaBox [0 0 612 792] >> endobj 3 0 obj << /ProcSet [ /PDF /Text ] /ColorSpace << /Cs1 5 0 R >> /Font << /F1.0 6 0 R /F2.0 7 0 R /F2.1 8 0 R >> >> endobj 10 0 obj << /Length 11 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ugҷtlaȱi"\.5汔^8tph0k!~D Thd6챖:>f&mxA4L&%kiĔ?Cqոm&/By#Ց%i'W:XlErr'=_ܗ)i7Ҭ,F|Nٮͯ6rm^ UHW5;?Ͱh endstream endobj 11 0 obj 706 endobj 5 0 obj [ /ICCBased 10 0 R ] endobj 13 0 obj << /Length 15 0 R /Filter /FlateDecode >> stream xڭn0=bk]c , kGRD }WٌW0\8 N3<p /kY P"9vZqi֖uo>9Y )(F`A%SCAz pOOJ1uRILD'Pۙ{ºZ2MLuT5f[OKH">M񻙤d:Elwc)qS5ESHRN*| ĩ90v=y~ـ$cLd>`8<`.gHrO$>\ }bm{lL[?-^jkzC15̰pfa,&0vx 0+lB-bٞ^aOyӓmjvOn Up~ Hvv[!HNnwly1 endstream endobj 15 0 obj 458 endobj 12 0 obj << /Type /Page /Parent 9 0 R /Resources 14 0 R /Contents 13 0 R /MediaBox [0 0 612 792] >> endobj 14 0 obj << /ProcSet [ /PDF /Text ] /ColorSpace << /Cs1 5 0 R >> /Font << /F1.0 6 0 R /F2.0 7 0 R /F2.1 8 0 R >> >> endobj 9 0 obj << /Type /Pages /MediaBox [0 0 612 792] /Count 2 /Kids [ 1 0 R 12 0 R ] >> endobj 16 0 obj << /Type /Catalog /Pages 9 0 R >> endobj 17 0 obj << /Length 18 0 R /Length1 10544 /Filter /FlateDecode >> stream x:{|{Ѥ/iҤM&iҼ4IIyҊP"[Dyje/:(sqCzYuL0.cVT {'m{=}G0!1gKmF^lsJĭm`[:֥dhͼfX ǯ._HйE-@W%/]dέ7G-ra Qpq;B܉x%+V fq'X|ʛ?{i <\" ^ d\S|cEP &P#`qX4.;$L`z%g8l7~+mŵ,b 0,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 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 ] endobj 6 0 obj << /Type /Font /Subtype /TrueType /BaseFont /TCCIHS+Courier-Bold /FontDescriptor 19 0 R /Widths 20 0 R /FirstChar 32 /LastChar 121 /Encoding /MacRomanEncoding >> endobj 21 0 obj << /Length 22 0 R /Length1 11600 /Filter /FlateDecode >> stream xzy|E$}FHT D\DD0" 5.U QzAo2GC}tGqvj;UϩnDJwB\$E+ 6֥,j'3-o~ ܇qQނysf|y+H {-\zS6b|;<{f+`|V_8Ezj;cM32yE7/Y*+1n¸q-s~0&H#1a 5& Q%Z_5/Sҿ|>Rp4J 2L 5S&eQ6Yx$1fi&Do%1Jog*Ylp"mkūE't;Rūj[Kk QAJ˕YNϋibu&wa@JMcXO{oW+V٦)תs+TQMx7+*S|"z +j3o2_+AzP 4K8`+&m(*y`{RXqtP,E/VRJb{ຆ6f*1J<ѧL6f/Эl#W~5LeI|i3 UxQJ,6KNuPVP*aVVN.\RY5 OmRUDjfA?J=hNjjlyMlBKh[iI4MzŠZqf|Hm5WM}Kkߟct}u6$bgWJh^f&)Njj8݃ )UF2_\8eꂅMM v]2k„Y`Q ?ʟ /vW Y)2m!_e綦ޡi^~Lfzuc{]vm]߮iW?wDwTwT{zL}L.,-+jnΩ$ >Rf8Re2VE)exh*qeEE%=n_UTfWҥ H./}f9|G+͵/i)ŭ-u=@^^ y]ac?;zUE~%Cl6TAH2q);)]%%=pR \+F n X=_zK uWdG7g`Q;Q\u%:Уg*5 *uE- x" "6-mH a cE_;7 \<3n9`l5fL@a h!ᗽ=.dz@T*C,GJW~uٻӬz@_Wq?8?NΰdM.ҦyK2gedG }=hwSCD*RaL\-qVdJqnd( jL"_`'jQ)?zyb+F׀ЍpE4/1?R8W!*z#οtSNG_'/ǔWRbO$OM\(ee wEjwz Qc]nFc(͋cABCF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 DcfuJg v0AȉrC|:@΃ `v7=ChnD{a2PڼBՍa/21/>/8ߌģDL\k͌qF\Bݖs~/ 4GHDw_H7Xco?y:]*]fQbN5R]}kuHnmnܻݠz\@Ś6يGb~ &o6mú' {fڧ.\;xq00߉#ރ}v#he 6|Rs?)`Z =ⱊt<{]&:}28WwxMjS^ Ӌ럾~]F7BV ;`> Vb IBb'ZY(נ4lHנԣHsPVAL0+"\p,C5\+ڿ#Ҡ5`NՉuj)\- Km r$LB}r5lEЯ0=d_ 7 ,!1-}Z3 ~Q蛺~ȡ0>+)WG`4hH꡿"iJ_x_y_K-@ȟϼlw9w6{Gޢ7NVgޠ:NHI.!t^\z-kUezH{ T䌂Zrv&gԒ  oKȻa_w g83 ia?a?au:8uYd_#e(^<9Yẝ%)?w!rNLs}v3iK6}+*<=t~jۛoJĔG)<:jMND<ɯ\Ẋq̔Lob*XxR^:u ?cYpkBE0!A=◫6w|/˪wps=1sCӫy**@<^gYy4u>7ܗ75{gD"&&W-mGx23WVY?J)QA$Z~1NJ1 -5l|2׈mM@ #it endstream endobj 22 0 obj 7528 endobj 23 0 obj << /Type /FontDescriptor /Ascent 754 /CapHeight 587 /Descent -246 /Flags 33 /FontBBox [ -164 -410 744 876 ] /FontName /XIKEXF+Courier /ItalicAngle 0 /StemV 0 /MaxWidth 823 /XHeight 457 /FontFile2 21 0 R >> endobj 24 0 obj [ 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 ] endobj 7 0 obj << /Type /Font /Subtype /TrueType /BaseFont /XIKEXF+Courier /FontDescriptor 23 0 R /Widths 24 0 R /FirstChar 32 /LastChar 117 /Encoding /MacRomanEncoding >> endobj 25 0 obj << /Length 26 0 R /Length1 4028 /Filter /FlateDecode >> stream xVw\uO$dTz- R/[C<ӢjuOX9jf9ffꌮh%[ml5{SUkcUٓ}Os߯^7 $,E*1&>/ZuiU%]@Yt朥q||W.#_L~, ڎ_N>gV%m6 B~+q'wU/ 'y#tyKݧ?G_|Ϫy35UXYk ׃24V*U1Yl8ֱZKR0< BoVr`EcåYd/6+9!-:24]mnq)/04ST[d!KI:bʋ \j"z?l-6>B&x>5^$m:ԿSJvJnvJv6^ <=.jnAeU:+>ow E[ꯉsU\FeW%#q ?`7 /}v@Ve}Uc'KwEqC*Eӝ0VwV$ct[fQ 8#5gpppkܙCT̊Oz^ayC_=ߒwGxlz̵^]:+=ըzDn'G{")k5,˶vE&h5.* ֻ q]t#CPBug~tT訛 N[݁]\і{uf䝄:Q۬}bkOP B:-A<@7ԯ} a*j|b9# endstream endobj 26 0 obj 2164 endobj 27 0 obj << /Type /FontDescriptor /Ascent 754 /CapHeight 587 /Descent -246 /Flags 5 /FontBBox [ -164 -410 744 876 ] /FontName /JDEZDC+Courier /ItalicAngle 0 /StemV 0 /MaxWidth 823 /XHeight 457 /FontFile2 25 0 R >> endobj 28 0 obj [ 600 ] endobj 29 0 obj << /Length 30 0 R /Filter /FlateDecode >> stream x]ϊ >ɭ ҥ}TبL!o_ {o~syQ0=&KX 89Ϛ3iYG3oK¹c)f{IՆ_J,~}k8O R`qu3豳wi;fo{mG$,.Q$'dR%/ ibm!ĩ.bb@YP> fV^)1b#p endstream endobj 30 0 obj 229 endobj 8 0 obj << /Type /Font /Subtype /TrueType /BaseFont /JDEZDC+Courier /FontDescriptor 27 0 R /Widths 28 0 R /FirstChar 33 /LastChar 33 /ToUnicode 29 0 R >> endobj 31 0 obj << /Author (Jim Brandt) /Creator (BBEdit) /CreationDate (D:20070530102031-04'00') /ModDate (D:20070530102031-04'00') /Producer (Mac OS X 10.4.9 Quartz PDFContext) /Title (untitled text) >> endobj xref 0 32 0000000000 00000 n 0000000834 00000 n 0000000022 00000 n 0000000938 00000 n 0000000815 00000 n 0000001889 00000 n 0000010420 00000 n 0000018823 00000 n 0000021840 00000 n 0000002709 00000 n 0000001060 00000 n 0000001869 00000 n 0000002479 00000 n 0000001925 00000 n 0000002586 00000 n 0000002459 00000 n 0000002799 00000 n 0000002849 00000 n 0000009792 00000 n 0000009813 00000 n 0000010040 00000 n 0000010597 00000 n 0000018216 00000 n 0000018237 00000 n 0000018459 00000 n 0000018995 00000 n 0000021249 00000 n 0000021270 00000 n 0000021491 00000 n 0000021515 00000 n 0000021820 00000 n 0000022001 00000 n trailer << /Size 32 /Root 16 0 R /Info 31 0 R /ID [ ] >> startxref 22206 %%EOF PDF-API2-Simple-1.1.4/t/pod.t0000644000076500007650000000020710753745077015466 0ustar cedarcedar00000000000000use Test::More; eval 'use Test::Pod 1.00'; plan( skip_all => 'Test::Pod 1.00 required for testing POD' ) if $@; all_pod_files_ok( );