Antonio Rosella > PDF-111 > PDF::Parse

Download:
PDF-111.tgz

Dependencies

Annotate this POD

Related Modules

PDF::API2
HTTP::Daemon
PDF::Core
Data::Dumper
PDF::Reuse
PDF::Create
File::Copy
Win32::OLE
WWW::Mechanize
HTML::Template
more...
By perlmonks.org

CPAN RT

New  3
Open  0
View/Report Bugs
Module Version: 1.11   Source  

NAME ^

PDF::Parse - Library with parsing functions for PDF library

SYNOPSIS ^

  use PDF::Parse;

  $pdf->TargetFile($filename);
  $pdf->LoadPageInfo;

  $version = $pdf->Version;
  $bool = $pdf->IsaPDF;
  $bool = $pdf->IscryptPDF;

  $info = $pdf->GetInfo ($key);
  $pagenum = $pdf->Pages;

  @size = $pdf->PageSize ($page);
  # or
  @size = $pdf->PageSize;

  $rotation = $pdf->PageRotation ($page);
  # or
  $rotation = $pdf->PageRotation;

DESCRIPTION ^

The main purpose of the PDF::Parse library is to provide parsing functions for the more general PDF library.

Methods ^

The available methods are:

TargetFile ( filename )

This method links the filename to the pdf descriptor and parses all kind of header information.

LoadPageInfo

This function loads the information for all pages. This process can take some time for big PDF-files.

Version

Returns the PDF version used for writing the object file.

IsaPDF

Returns true, if the file could be parsed and is a PDF-file.

IscryptPDF

Returns true if the PDF contains a crypt object. This indicates that the data of the PDF-File is encrypted. In this case, not all function work as expected.

GetInfo ( key )

Returns the various information contained in the info section of a PDF file (if present). A PDF file can have:

  a title ==> GetInfo ("Title")
  a subject ==> GetInfo ("Subject")
  an author ==> GetInfo("Author")
  a creation date ==> GetInfo("CreationDate")
  a creator ==> GetInfo("Creator")
  a producer ==> GetInfo("Producer")
  a modification date ==> GetInfo("ModDate")
  some keywords ==> GetInfo("Keywords")

Pages

Returns the number of pages of the PDF-file.

PageSize ( [ page ] )

Returns the size of a page in the PDF-file. If no parameter is given, the default size of the root page will be returned. This value may be overridden for any page.

If the size of an individual page is requested and the page data is not already loaded, the method LoadPageInfo will be executed. This may take some time for large PDF-files. The size of the root page is always available and will never execute LoadPageInfo.

PageRotation ( [ page ] )

Returns the rotation of a page in the PDF-file. If no parameter is given, the default rotation of the root page will be returned. This value may be overridden for any page.

If the rotation of an individual page is requested and the page data is not already loaded, the method LoadPageInfo will be executed. This may take some time for large PDF-files. The rotation of the root page is always available and will never execute LoadPageInfo.

Variables ^

The only available variable is :

$PDF::Parse::VERSION

Contains the version of the library installed

Copyright ^

  Copyright (c) 1998 - 2000 Antonio Rosella Italy antro@tiscalinet.it, Johannes Blach dw235@yahoo.com 

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

Availability ^

The latest version of this library is likely to be available from:

http://www.geocities.com/CapeCanaveral/Hangar/4794/

syntax highlighting: