I am trying to read custom Document properties of PDF file using PowerShell script. I could able to read Microsoft documents, but I am unable to read PDF metadata. Your reply is highly appreciated.
I can read docx properties like below through Powershell as below:
$application = New-Object -ComObject word.application $application.Visible = $false $document = $application.documents.open(“C:\test\Classified Document.docx”) $binding = “System.Reflection.BindingFlags” -as [type] $customProperties = $document.CustomDocumentProperties
But the above code is not working for PDF files.