Author Topic: How to remove metadata from PDF  (Read 243 times)

pdfhelp

  • Newbie
  • *
  • Posts: 3
How to remove metadata from PDF
« on: April 09, 2019, 01:46:52 PM »
Hello, super noob here.  Have just about zero understanding of computer code.  I know how to open and read the data with the application, but not remove.  I'm sure it's more simple than I think.  Just looking to remove XMP Toolkit and have the creation time the same as modification time. 

Thank you!

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14759
    • ExifTool Home Page
Re: How to remove metadata from PDF
« Reply #1 on: April 09, 2019, 01:53:53 PM »
(Assuming you are on Windows...) The simplest thing to do would be to rename "exiftool(-k).exe" to "exiftool(-xmptoolkit= -P -k).exe", then drag and drop files and folders onto the app to do what you requested.

But note that ExifTool doesn't actually remove metadata from a PDF, so edits like this are reversible.  You need to run a utility such as qpdf afterwards to remove the old metadata.  See the top of the PDF tag documentation for details.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

pdfhelp

  • Newbie
  • *
  • Posts: 3
Re: How to remove metadata from PDF
« Reply #2 on: April 09, 2019, 01:58:37 PM »
Thanks for the quick reply.  And sorry again for what I assume are things you've heard 100x.  Yes, I am using Windows 10. 

I just did that and it saved the file automatically as .PDF_Origional.  How do I get that to be a PDF?

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2516
Re: How to remove metadata from PDF
« Reply #3 on: April 09, 2019, 02:01:22 PM »
I just did that and it saved the file automatically as .PDF_Origional.  How do I get that to be a PDF?

That's just the backup file.  If you check the main file, you'll see that the data has been removed.  Add -overwrite_original to prevent the creation of backup files.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14759
    • ExifTool Home Page
Re: How to remove metadata from PDF
« Reply #4 on: April 09, 2019, 02:02:55 PM »
Add -overwrite_original to prevent the creation of backup files.

ie) rename the app to "exiftool(-xmptoolkit= -P -overwrite_original -k).exe"

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

pdfhelp

  • Newbie
  • *
  • Posts: 3
Re: How to remove metadata from PDF
« Reply #5 on: April 09, 2019, 02:08:24 PM »
Add -overwrite_original to prevent the creation of backup files.

ie) rename the app to "exiftool(-xmptoolkit= -P -overwrite_original -k).exe"

- Phil

Ok, awesome!  That removed the XMP Toolkit, now how do I go about adding a creation date?  Was a little confused.  Again, sorry :(

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14759
    • ExifTool Home Page
Re: How to remove metadata from PDF
« Reply #6 on: April 09, 2019, 09:45:16 PM »
What creation date do you want to add?  A fixed date?  From the file creation date or a date from any other tag?  The current date? It may be easier at this point to go to the command line...

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).