Clotho Advanced Media > CAM-PDF-1.08 > CAM::PDF::PageText

Download:
CAM-PDF-1.08.tgz

Dependencies

Annotate this POD

CPAN RT

Open  4
View Bugs
Report a bug
Module Version: 1.08   Source   Latest Release: CAM-PDF-1.52

NAME ^

CAM::PDF::PageText - Extract text from PDF page tree

SYNOPSIS ^

   my $pdf = CAM::PDF->new($filename);
   my $pageone_tree = $pdf->getPageContentTree(1);
   print CAM::PDF::PageText->render($pageone_tree);

DESCRIPTION ^

This module attempts to extract sequential text from a PDF page. This is not a robust process, as PDF text is graphically laid out in arbitrary order. This module uses a few heuristics to try to guess what text goes next to what other text, but may be fooled easily by, say, subscripts, non-horizontal text, changes in font, form fields etc.

All those disclaimers aside, it is useful for a quick dump of text from a simple PDF file.

LICENSE ^

Copyright 2006 Clotho Advanced Media, Inc., <cpan@clotho.com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

FUNCTIONS ^

$pkg->render($pagetree)
$pkg->render($pagetree, $verbose)

Turn a page content tree into a string. This is a class method that should be called like:

   CAM::PDF::PageText->render($pagetree);

AUTHOR ^

Clotho Advanced Media Inc., cpan@clotho.com

Primary developer: Chris Dolan