Read file summary using DSOFILE

xiaoxiao2021-03-06  14

Download the DSOFILE installation package on Microsoft website, register the dsofile.dll file after installation. Open Delphi 7.0, import this OLE from the menu "Project" -> "Import Type Library". New projects, select ToledocumentProperties from the control ActiveX page to the form, read modifications to the file summary attribute.

Procedure TFORM1.BUTTON1CLICK (Sender: TOBJECT);

VAR

Sp: summaryproperties;

Begin

OledocumentProperties1.Open ('c: /123.pdf', transue, dsoptionopenreadonlyifnowriteAccess);

SP: = OledocumentProperties1.summaryProperties;

Memo1.Lines.Add ('Title:' sp.title);

Memo1.Lines.Add ('Subject:' sp.SUBJECT);

Memo1.Lines.Add ('category:' sp.category);

Memo1.Lines.Add ('Author:' sp.author);

Memo1.Lines.Add ('Keywords:' sp.Keywords);

Memo1.Lines.Add ('Comments:' sp.comments);

OLEDocumentproperties1.close (false);

END;

转载请注明原文地址:https://www.9cbs.com/read-50807.html

New Post(0)