KatoXY Posted December 6, 2011 Share Posted December 6, 2011 Hi, I have huge numbers of pdf files. All of them have set property such like Author, Subject, Keywords. Is any way to get this informations? I mean about _WordDocPropertyGet function which works with pdf files. Link to comment Share on other sites More sharing options...
water Posted December 6, 2011 Share Posted December 6, 2011 There is an available to retrieve extended properties of a file. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 6, 2011 Moderators Share Posted December 6, 2011 KatoXY, And a slightly updated version with the property codes for XP, Vista and Win7 here. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
KatoXY Posted December 7, 2011 Author Share Posted December 7, 2011 water:Generally this script working with files but it doesn't read properties from pdf.I take one from Dell page: http://support.dell.com/support/edocs/systems/op990/en/ts/ts_en.pdfNormally it has Title and Author but script doesn' read it.Melba23:I don't understand this topic. Probably I couldn't use this function.I checked in Windows 7 x64, AutoitScript 3.3.6.1 Link to comment Share on other sites More sharing options...
water Posted December 7, 2011 Share Posted December 7, 2011 If you search for properties that aren't visible for Windows then you have to open the document and retrieve the data. How to access this data depends on the program you have installed as PDF reader (Adobe Acrobat Reader, Foxit ...). What do you use? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
KatoXY Posted December 7, 2011 Author Share Posted December 7, 2011 Adobe Acrobat Reader X Ver 10.0.1.434 Link to comment Share on other sites More sharing options...
water Posted December 7, 2011 Share Posted December 7, 2011 you can find a somehow "brute" method by reading the file and searching for the keyword. I don't know how fast this emthod is i you have a lot of documents. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted December 7, 2011 Share Posted December 7, 2011 Or you can try the Adobe COM interface as described My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted December 7, 2011 Share Posted December 7, 2011 (edited) Here is an example script to retrieve title, Author, Keywords, Subject, Creator, Producer, CreationDate:expandcollapse popup$oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Initialize a COM error handler $sFilePath = "C:tempTest.pdf" $oApp = ObjCreate("AcroExch.App") ; start Adobe Acrobat $oDoc = ObjCreate("AcroExch.AVDoc") ; connect to Ac Viewer If $oDoc.Open($sFilePath, "") Then ; open the file $oPDDoc = $oDoc.GetPDDoc $sAuthor = $oPDDoc.GetInfo("Author") $sTitle = $oPDDoc.GetInfo("Title") $sKeywords = $oPDDoc.GetInfo("Keywords") $sSubject = $oPDDoc.GetInfo("Subject") $sCreator = $oPDDoc.GetInfo("Creator") $sProducer = $oPDDoc.GetInfo("Producer") $sCreationDate = $oPDDoc.GetInfo("CreationDate") MsgBox(64, "PDF Info", "Author: " & $sAuthor & @CRLF & _ "Title: " & $sTitle & @CRLF & _ "Subject: " & $sSubject & @CRLF & _ "Keywords: " & $sKeywords & @CRLF & _ "Creator: " & $sCreator & @CRLF & _ "Producer: " & $sProducer & @CRLF & _ "CreationDate: " & $sCreationDate) EndIf $oApp.exit() ; close process ; release objects $oDoc = 0 $oApp = 0 $oPDDoc = 0 ; This is my custom defined error handler Func MyErrFunc() Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & hex($oMyError.number,8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) EndfuncA good reference for Acrobat X. Edited December 7, 2011 by water suicider 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
ReFran Posted December 7, 2011 Share Posted December 7, 2011 (edited) Mmmh,the product : "Adobe Acrobat Reader X Ver 10.0.1.434" doesn't exists.You may have; "Adobe Acrobat x ... the $$$ product or just the free "Adobe Reader X .."I would asume you have Reader only.With that you don't can use the ActiveX components like "$oApp = ObjCreate("AcroExch.App")", which is stated in the third post from @water.The "brute" method, also remarked by @water, my work and is maybe good enough.Otherwise I would take pdfTk.exe or perhabs http://www.becyhome.de/download_eng.htm#becypdfmetaeditwhich also can be used as command line tool and has a batch option.HTH, Reinhard Edited December 7, 2011 by ReFran Link to comment Share on other sites More sharing options...
water Posted December 7, 2011 Share Posted December 7, 2011 Oops I didn't know that Adobe Acrobat was still installed on my new machine. I told our IT department to uninstall Adobe Acrobat some months ago - but they didn't do it. So as the script was working fine I assumed the Adobe Reader had a COM interface as well. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
ReFran Posted December 7, 2011 Share Posted December 7, 2011 Let Adobe Acobat on the maschine. For most quick task you still can use older versions (5-7,8,9). For merge, split, bookmarks .. I use mostly pdftk or mbtPdsAsm. The Reader has a small interface for use it embedded (like for IE,..), but there are only some few properties, which can be influenced (zoom, pageview, ..). best regards, Reinhard Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now