The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

CAM::PDF::Renderer::Text - Render an ASCII image of a PDF page

LICENSE

See CAM::PDF.

SYNOPSIS

use CAM::PDF;
my $pdf = CAM::PDF->new($filename);
my $contentTree = $pdf->getPageContentTree(4);
$contentTree->render("CAM::PDF::Renderer::Text");

DESCRIPTION

This class is used to print to STDOUT the coordinates of each node of a page layout. It is written both for debugging and as a minimal example of a renderer.

GLOBALS

The $CAM::PDF::Renderer::Text::xdensity and $CAM::PDF::Renderer::Text::ydensity define the scale of the ASCII graphical output device. They both default to 6.0.

FUNCTIONS

new

Calls the superclass constructor, and initializes the ASCII PDF page.

renderText STRING

Prints the characters of the screen to our virtual ASCII framebuffer.

CAM::PDF::Renderer::Text::FB

This is the FrameBuffer class

new WIDTH, HEIGHT

Creates a new framebuffer.

set X, Y, STRING

Renders a string on the framebuffer.

DESTROY

Prints the framebuffer to STDOUT just before it is destroyed.

AUTHOR

Clotho Advanced Media Inc., cpan@clotho.com