disabled
  A   ˆl–äY>”Ši?u	@½p/ÜêbÑ¿�þE+¬¬Ùd|o
@:éüÿË„‚Ó¿Ê_ˆI|¥�+V[(ÉÈ /s    package PDF::API2::Lite;

use strict;
no warnings qw[ deprecated recursion uninitialized ];

our $VERSION = '2.044'; # VERSION

BEGIN {

    use PDF::API2;
    use PDF::API2::Util;
    use PDF::API2::Basic::PDF::Utils;

    use POSIX qw( ceil floor );
    use Scalar::Util qw(blessed);

    use vars qw( $hasWeakRef );

}

=head1 NAME

PDF::API2::Lite - (do not use)

=head1 SYNOPSIS

    $pdf = PDF::API2::Lite->new;
    $pdf->page(595,842);
    $img = $pdf->image('some.jpg');
    $font = $pdf->corefont('Times-Roman');
    $font = $pdf->ttfont('TimesNewRoman.ttf');

=head1 DESCRIPTION

This class is unmaintained (since 2007) and should not be used in new code.  It
combines many of the methods from L<PDF::API2> and L<PDF::API2::Content> into a
single class but isn't otherwise any easier to use.

There have been many improvements and clarifications made to the rest of the
distribution that aren't reflected here, so the term "Lite" no longer applies.
It remains solely for compatibility with existing legacy code.

=head1 METHODS

=over

=item $pdf = PDF::API2::Lite->new

=cut

sub new {
    my $class=shift(@_);
    my %opt=@_;
    my $self={};
    bless($self,$class);
    $self->{api}=PDF::API2->new(@_);
    return $self;
}

=item $pdf->page

=item $pdf->page $width,$height

=item $pdf->page $llx, $lly, $urx, $ury

Opens a new page.

=cut

sub page {
    my $self=shift;
    $self->{page}=$self->{api}->page;
    $self->{page}->mediabox(@_) if($_[0]);
    $self->{gfx}=$self->{page}->gfx;
#   $self->{gfx}->compressFlate;
    return $self;
}


=item $pdf->mediabox $w, $h

=item $pdf->mediabox $llx, $lly, $urx, $ury

Sets the global mediabox.

=cut

sub mediabox {
    my ($self,$x1,$y1,$x2,$y2) = @_;
    if(defined $x2) {
        $self->{api}->mediabox($x1,$y1,$x2,$y2);
    } else {
        $self->{api}->mediabox($x1,$y1);
    }
    $self;
}

=item $pdf->saveas $file

Saves the document (may not be modified later) and
deallocates the pdf-structures.

=cut

sub saveas {
    my ($self,$file)=@_;
    if($file eq '-') {
        return $self->{api}->to_string();
    } else {
        $self->{api}->save($file);
        return $self;
    }
    foreach my $k (keys %{$self}) {
        if(blessed($k) and $k->can('release')) {
            $k->release(1);
        } elsif(blessed($k) and $k->can('end')) {
            $k->end;
        }
        $self->{$k}=undef;
        delete($self->{$k});
    }
    return;
}


=item $font = $pdf->corefont $fontname

Returns a new or existing adobe core font object.

B<Examples:>

    $font = $pdf->corefont('Times-Roman');
    $font = $pdf->corefont('Times-Bold');
    $font = $pdf->corefont('Helvetica');
    $font = $pdf->corefont('ZapfDingbats');

=cut

sub corefont {
    my ($self,$name,@opts)=@_;
    my $obj=$self->{api}->corefont($name,@opts);
    return $obj;
}

=item $font = $pdf->ttfont $ttfile

Returns a new or existing truetype font object.

B<Examples:>

    $font = $pdf->ttfont('TimesNewRoman.ttf');
    $font = $pdf->ttfont('/fonts/Univers-Bold.ttf');
    $font = $pdf->ttfont('../Democratica-SmallCaps.ttf');

=cut

sub ttfont {
    my ($self,$file,@opts)=@_;
    return $self->{api}->ttfont($file,@opts);
}

=item $font = $pdf->psfont($ps_file, [%options])

Returns a new type1 font object.

B<Examples:>

    $font = $pdf->psfont('TimesRoman.pfa', -afmfile => 'TimesRoman.afm', -encode => 'latin1');
    $font = $pdf->psfont('/fonts/Univers.pfb', -pfmfile => '/fonts/Univers.pfm', -encode => 'latin2');

=cut

sub psfont {
    my ($self,@args)=@_;
    return $self->{api}->psfont(@args);
}

#=item @color = $pdf->color $colornumber [, $lightdark ]
#
#=item @color = $pdf->color $basecolor [, $lightdark ]
#
#Returns a color.
#
#B<Examples:>
#
#    @color = $pdf->color(0);        # 50% grey
#    @color = $pdf->color(0,+4);     # 10% grey
#    @color = $pdf->color(0,-3);     # 80% grey
#    @color = $pdf->color('yellow');     # yellow, fully saturated
#    @color = $pdf->color('red',+1);     # red, +10% white
#    @color = 