TransWikia.com

Hard to remove 2 metadata fields in PDF using Acrobat XI Pro (Mac)

Super User Asked by su1980 on December 27, 2021

Under the “Get Info” screen of the PDF file, More Info, How do I remove the metadata for “Encoding Software” and “Where From” ?

If I open this PDF in Acrobat XI Pro (Mac) and open File/Properties/Description/Additional Metadata then:

— “Encoding Software” does show up but can’t be deleted.

— “Where From” is nowhere to be found. It’s not searchable in the PDF at all either.

Where is this problem metadata stored?

How can this problem metadata be deleted? (without having to resort to “Remove Hidden Information” which deletes ALL the Metadata, even the fields I want to keep).

2 Answers

To remove/update "Encoding Software" from a PDF:

  • Go to your terminal and run pip install pypdf2
  • Create a python script named override.py with:
import pprint

from PyPDF2 import PdfFileReader, PdfFileMerger

if __name__ == '__main__':
    file_in = open('old.pdf', 'rb')
    pdf_reader = PdfFileReader(file_in)
    metadata = pdf_reader.getDocumentInfo()
    pprint.pprint(metadata)

    pdf_merger = PdfFileMerger()
    pdf_merger.append(file_in)
    pdf_merger.addMetadata({
        '/Producer': 'Leave empty to remove',
    })
    file_out = open('new.pdf', 'wb')
    pdf_merger.write(file_out)

    file_in.close()
    file_out.close()

code courtesy: https://stackoverflow.com/a/58222282/1895600

  • Copy your pdf file in current directory with name: old.pdf
  • Run python override.py

A new file will be created with the "Encoding software" value as provided in the script above.

Cheers !?

Answered by mayankcpdixit on December 27, 2021

The Where From metadata is a Mac filesystem attribute rather than a property of the PDF. It can be removed using this command:

xattr -d com.apple.metadata:kMDItemWhereFroms FILE_NAME

For more information check this question https://apple.stackexchange.com/questions/110239/where-is-the-where-from-meta-data-stored-when-downloaded-via-chrome

Answered by Jozef Legény on December 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP