source: trunk/gsdl/bin/script/indexes/PDF.pm@ 1971

Last change on this file since 1971 was 1971, checked in by jmt14, 23 years ago

added files: Core.pm PDF.pm Parse.pm amend_pdf.pl

buildkpi.pl buildkpiS.pl buildkpiK.pl relation.pl

  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
1#
2# PDF.pm, version 1.11 February 2000 antro
3#
4# Copyright (c) 1998 - 2000 Antonio Rosella Italy [email protected], Johannes Blach [email protected]
5#
6# Free usage under the same Perl Licence condition.
7#
8
9package PDF;
10
11$PDF::VERSION = "1.11";
12
13require 5.005;
14
15#require PDF::Core;
16#require PDF::Parse;
17require Core;
18require Parse;
19
20use strict;
21use Carp;
22use Exporter ();
23
24use vars qw(@ISA $Verbose);
25
26#
27# Verbose off by default
28#
29$Verbose = 0;
30
31@ISA = qw(Exporter PDF::Core PDF::Parse);
32
331;
34
35__END__
36
37=head1 NAME
38
39PDF - Library for PDF access and manipulation in Perl
40
41=head1 SYNOPSIS
42
43 use PDF;
44
45 $pdf=PDF->new ;
46 $pdf=PDF->new(filename);
47
48 $result=$pdf->TargetFile( filename );
49
50 print "is a pdf file\n" if ( $pdf->IsaPDF ) ;
51 print "Has ",$pdf->Pages," Pages \n";
52 print "Use a PDF Version ",$pdf->Version ," \n";
53 print "and it is crypted " if ( $pdf->IscryptedPDF) ;
54
55 print "filename with title",$pdf->GetInfo("Title"),"\n";
56 print "and with subject ",$pdf->GetInfo("Subject"),"\n";
57 print "was written by ",$pdf->GetInfo("Author"),"\n";
58 print "in date ",$pdf->GetInfo("CreationDate"),"\n";
59 print "using ",$pdf->GetInfo("Creator"),"\n";
60 print "and converted with ",$pdf->GetInfo("Producer"),"\n";
61 print "The last modification occurred ",$pdf->GetInfo("ModDate"),"\n";
62 print "The associated keywords are ",$pdf->GetInfo("Keywords"),"\n";
63
64 my (startx,starty, endx,endy) = $pdf->PageSize ($page) ;
65
66=head1 DESCRIPTION
67
68The main purpose of the PDF library is to provide classes and
69functions that allow to read and manipulate PDF files with perl. PDF
70stands for Portable Document Format and is a format proposed by Adobe.
71A full description of this format can be found in the B<Portable
72Document Reference Manual> by B<Adobe Systems Inc.>. For more details
73about PDF, refer to:
74
75B<http://www.adobe.com/>
76
77The main idea is to provide some "basic" modules for access
78the information contained in a PDF file. Even if at this
79moment is in an early development stage, the scripts in the
80example directory show that it is usable.
81
82B<is_pdf> script test a list of files in order divide the PDF file
83from the non PDF using the info provided by the files
84themselves. It doesn't use the I<.pdf> extension, it uses the information
85contained in the file.
86
87B<pdf_version> returns the PDF level used for writing a file.
88
89B<pdf_pages> gives the number of pages of a PDF file.
90
91B<pagedump.pl> prints some information about individual pages in a
92PDF-file. Although the information as such are not very useful, it
93demontrates well some more complex aspects of the library. Check the
94function B<doprint> in this program on how to handle all possible data
95occuring in a PDF.
96
97The library is now splitted in 2 section :
98
99B<PDF::Core> that contains the data structure, the constructor and low
100level access fuctions;
101
102B<PDF::Parse> all kind of functions to parse the PDF-files and
103provide information about the content.
104
105Check the help-files of these modules for more details.
106
107=head1 Variables
108
109There are 2 variables that can be accessed:
110
111=over 4
112
113`=item B<$PDF::VERSION>
114
115Contain the version of the library installed.
116
117=item B<$PDF::Verbose>
118
119This variable is false by default. Change the value if you want
120more verbose output messages from library.
121
122=back 4
123
124=head1 Copyright
125
126 Copyright (c) 1998 - 2000 Antonio Rosella Italy [email protected], Johannes Blach [email protected]
127
128This library is free software; you can redistribute it and/or
129modify it under the same terms as Perl itself.
130
131=head1 Availability
132
133The latest version of this library is likely to be available from:
134
135http://www.geocities.com/CapeCanaveral/Hangar/4794/
136
137and at any CPAN mirror
138
139=head1 Greetings
140
141Fabrizio Pivari ( [email protected] ) for all the suggestions about life, the universe and everything.
142Brad Appleton ( [email protected] ) for his suggestions about the module organization.
143Thomas Drillich for the iso latin1 support
144Ross Moore ( [email protected] ) for ReadInfo fix
145
146=cut
147
148
149
150
151
152
153
Note: See TracBrowser for help on using the repository browser.