Re: PDF PArser
- From: "Girish Patil \(Gnostice\)" <girish@xxxxxxxxxxxx>
- Date: Thu, 22 Sep 2005 11:33:48 +0530
Hi Mark,
You can do this with PDFtoolkit VCL. The Standard edition as well.
http://www.gnostice.com/pdftoolkit.asp
PDFtoolkit can also read/parse PDF version 1.5 and 1.6 (Acrobat 6 and 7) files.
Here's some code:
Read document properties
------------------------
gtPDFDocument.LoadFromFile('Input.pdf');
with gtPDFDocument.DocInfo do
begin
// Store into local variables
lTitle := Title;
lAuthor := Author;
lSubject := Subject;
lKeywords := Keywords;
lCreator := Creator;
end;
Write document properties
-------------------------
gtPDFDocument.LoadFromFile('Input.pdf');
with gtPDFDocument.DocInfo do
begin
// Write into document properties
Title := 'Document Title';
Author := 'Document Author';
Subject := 'Document Subject';
Keywords := 'PDF, Keywords';
Creator := 'The Creator';
end;
gtPDFDocument.SaveToFile('Output.pdf');
Let us know if you have further questions.
--
Girish Patil
Gnostice Information Technologies www.gnostice.com
---------------------------------------------------------------------
Gnostice eDocEngine (http://www.gnostice.com/edoc_engine.asp) -
Electronic document creation, Report Export, PDF eForms creation...
Gnostice PDFtoolkit (http://www.gnostice.com/pdftoolkit.asp) -
View, Print, Convert, Modify, Enhance PDF docs, process PDF eForms...
---------------------------------------------------------------------
"Mark Williams" <mark@{removethis}skwirel.com> wrote in message
news:43319f51$1@xxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I've been trying to write a function that extracts document properties from a
> pdf eg author, title, pagecount etc.
>
> I take a few steps forward followed by many steps back and I've now become too
> frustrated with it.
>
> Has anyone managed to do this reliably or knows of any third party components
> that can do this. I don't want a full blown pdf component set, just a
> lightweight component or code sample that does just this.
>
> Thanks in advance.
>
> Mark Williams
>
.
- References:
- PDF PArser
- From: Mark Williams
- PDF PArser
- Prev by Date: ANN: New versions of all MXS components
- Next by Date: Re: EurekaLog 5.0.3 (Catch every Exception showing Line#)
- Previous by thread: Re: PDF PArser
- Next by thread: Re: PDF PArser
- Index(es):
Relevant Pages
|