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.

  • 2
    Please note that Super User is not a script writing service. If you tell us what you have tried so far (including any scripts you are using) and where you are stuck then we can try to help with specific problems. You should also read How do I ask a good question?. – DavidPostill Apr 13 '16 at 11:57
  • @DavidPostill he might be looking for a single command solution/asking if such a thing exists. He didn't ask for a script, he said he's trying to write one. I think. – Cestarian Apr 13 '16 at 12:01
  • 1
  • Yes,I just want to know, if it's possible with Powershell script. If I know, it's possible, I can hire a person for this job. – Guest Apr 13 '16 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.