CAM::PDF::Renderer::Images - Find all of the images in a page


CAM-PDF documentation Contained in the CAM-PDF distribution.

Index


Code Index:

NAME

Top

CAM::PDF::Renderer::Images - Find all of the images in a page

LICENSE

Top

See CAM::PDF.

SYNOPSIS

Top

    use CAM::PDF;
    my $pdf = CAM::PDF->new($filename);
    my $contentTree = $pdf->getPageContentTree(4);
    my $gs = $contentTree->findImages();
    my @imageNodes = @{$gs->{images}};

DESCRIPTION

Top

This class is used to identify all image nodes in a page content tree.

FUNCTIONS

Top

$self->new()

Creates a new renderer.

$self->clone()

Duplicates an instance. The new instance deliberately shares its images property with the original instance.

$self->Do(DATA...)

Record an indirect image node.

$self->BI(DATA...)

Record an inline image node.

AUTHOR

Top

See CAM::PDF


CAM-PDF documentation Contained in the CAM-PDF distribution.
package CAM::PDF::Renderer::Images;

use 5.006;
use warnings;
use strict;

our $VERSION = '1.55';

sub new
{
   my $pkg = shift;
   return bless {
      images => [],
   }, $pkg;
}

sub clone
{
   my $self = shift;

   my $pkg = ref $self;
   my $new_self = $pkg->new();
   $new_self->{images} = $self->{images};
   return $new_self;
}

sub Do
{
   my ($self, @rest) = @_;
   my $value = [@rest];

   push @{$self->{images}}, {
      type => 'Do',
      value => $value,
   };
   return;
}

sub BI
{
   my ($self, @rest) = @_;
   my $value = [@rest];

   push @{$self->{images}}, {
      type => 'BI',
      value => $value,
   };
   return;
}

1;
__END__