Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to edit PDF METADATA

I tried a brief search on this but I'd love to make sure I understand if there are multiple ways of doing this and most posts seemed to revolve around how to post a pdf anonymously.


Can anyone help me understand how many ways i can EDIT pdf metadata? I am posting docs to Google and while these come up listed with the correct file name the display at the top seems to be pulling some kind of legacy file name which I assume is in the file metadata somewhere. I need to edit this to fix the issue.


I tried Inspector in Preview but it did not seem to allow me to edit this info. Also, I assume (?) that I can see and edit this info in Aperture but Aperture is not a normal workflow for me with PDF and I'd love to do this quickly in something like Preview.


TIA for any help.

Posted on Dec 24, 2011 10:47 AM

Reply
Question marked as Best reply

Posted on Dec 25, 2011 3:44 AM

I hate being disagreeable on such a day as this, but I have to say it. I disagree with kurt188 in the strongest possible terms.


(1) Of course PDF metadata is easily editable. (I use "PDF metadata" in the same sense as hotwheels 22, which is the common usage. Whether it is also the correct usage is a different matter.) Maybe it wasn't intended to be editable originally, I don't know; but the point is moot anyway, as Adobe, originator of PDF, has been for some time providing this capability with Adobe Acrobat (not the free Acrobat Reader, though). (The exception is the password-protected PDF, which is supposed not to be editable. The stress is on "supposed" -- and that's all this forum's terms of use allow me to say.)


(2) Using BBEdit or another text editor to edit PDF metadata is a seriously bad idea. That's because (by contrast with, for instance, HTML) PDF is not "text under the hood". If one thinks one really knows the PDF format (which is what I suppose kurt188 meant by "syntax"), and one really wants to do things the hard way, then one should use a hex editor.


(3) There is a plethora of tools with PDF metadata editing capabilities out there. One can easily find them in the usual way (Google, MacUpdate, etc). Hence, I'll mention only two. PDFInfo is free and works on a single file or a folder of files. And the other one is ye olde Automator, which has a whole bunch of PDF-related actions, including Get PDF Metadata and Set PDF Metadata.

25 replies
Question marked as Best reply

Dec 25, 2011 3:44 AM in response to hotwheels22

I hate being disagreeable on such a day as this, but I have to say it. I disagree with kurt188 in the strongest possible terms.


(1) Of course PDF metadata is easily editable. (I use "PDF metadata" in the same sense as hotwheels 22, which is the common usage. Whether it is also the correct usage is a different matter.) Maybe it wasn't intended to be editable originally, I don't know; but the point is moot anyway, as Adobe, originator of PDF, has been for some time providing this capability with Adobe Acrobat (not the free Acrobat Reader, though). (The exception is the password-protected PDF, which is supposed not to be editable. The stress is on "supposed" -- and that's all this forum's terms of use allow me to say.)


(2) Using BBEdit or another text editor to edit PDF metadata is a seriously bad idea. That's because (by contrast with, for instance, HTML) PDF is not "text under the hood". If one thinks one really knows the PDF format (which is what I suppose kurt188 meant by "syntax"), and one really wants to do things the hard way, then one should use a hex editor.


(3) There is a plethora of tools with PDF metadata editing capabilities out there. One can easily find them in the usual way (Google, MacUpdate, etc). Hence, I'll mention only two. PDFInfo is free and works on a single file or a folder of files. And the other one is ye olde Automator, which has a whole bunch of PDF-related actions, including Get PDF Metadata and Set PDF Metadata.

Dec 24, 2011 12:14 PM in response to hotwheels22

You should ask yourself why you want to edit the MetaData for PDF files. Is there something that people see when reading them via Google Docs that you don't want them to see? If so, maybe you shouldn't be posting them to Google Docs at all.


That said, there are only two ways to edit that MetaData:


1. Open the PDF file using a text editor such as BBEdit, then change the values for the data to be what you want, and save the file. However, this requires you to be able to understand PDF syntax, which I doubt you do, the end result could easily be a corrupted, useless PDF file.


2. Use PDFtk, a command line utility for manipulating PDF files, for Mac OS X 10.6 and higher. If you're not comfortable with Terminal, this is not something you should do, because the results for doing the wrong thing could easily be a corrupted PDF file, or worse.


But if you want to try that, you can download it here: http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/

Dec 24, 2011 2:30 PM in response to hotwheels22

There isn't any Mac (or Windows) software that allows you to edit the metadata of a PDF, so looking for that will waste a lot of your time. That information was never meant to be edited by the user; Acrobat Pro won't even let you do that, so paying for that would be a huge waste of money.


The software I linked to is shareware/freeware, so you don't have to pay anything for it; all they ask for is donations to help them support and update the software with bug fixes, new versions, etc.


Try it; you have nothing to lose and everything to gain.

Dec 24, 2011 1:59 PM in response to kurt188

Hi Kurt.


Apparently when you look at this in Adobe Acrobat reader you can see that there is a "File name" and a "Title". In this case the Title is not the same as the File name and is actually showing an earlier version before the Pages document was renamed. Does that make sense?


Originally the file was a Pages doc and it was named "bob's doc.pages" then it was renamed and then (I believe) it became a Pages doc named "jim's doc.pages". I then printed to pdf from pages and it became a file named "jim's doc.pdf".


So now there are two different names for this file showing up on Google. I want the "Title" to be the same as the File name since two different things here are very confusing, even for me.


Apparently i can edit this in the full acrobat version but I'd like to hold off on spending the 199 US dollars on this.


I took a look in TextWrangler but the code in here looks quite daunting. Do you happen to know if the important info is prepended by some term such as "<title>" or some such that I can get in and edit if I know I just have to change "bob" to "jim"?


Terminal type commands seems like it is also more than I want to bite off on this one and it does seem to me like mac ought to have an easier was to edit this kind of data, which would be really great of course.


Perhaps there is another free "workaround" version of Acrobat that will do this??


Thanks.

Dec 24, 2011 2:09 PM in response to hotwheels22

There's no easy way to edit MetaData for a PDF file, because it's not meant to be altered.


You might be able to use Combine PDFs: http://www.monkeybreadsoftware.de/Software/CombinePDFs.shtml (requires Mac OS X 10.4 or higher). You could launch the program, open (or drag and drop) the PDF file in question onto the window, then change the Title, Author, and Creator and save that, which would give you a new file with whatever name you choose to Save it as.


If it works the way it implies, that should give you what you want, without having to delve into Terminal.


Your mileage may vary. Void where taxed or prohibited by law. MA and RI residents not eligible.

Dec 24, 2011 2:23 PM in response to kurt188

Hi Kurt.


Thanks. Hopefully if someone has a good answer on doing this with mac software they will drop in. I can't tell whether your url requires a purchase to use at which point I sort of would just want to end up buying Acrobat and get it over with so I get full functionality. Ideally I'd buy a Acrobat 3D version but I can't tell if this is available for the mac or only on windows which would be a bummer.


In any event, I am not sure I understand the "not meant to be edited" aspect of this. I mean, the document had a file name and there is some legacy information in here for an /old/ file name and Google docs is showing this old legacy information which really shouldn't be in here anyway. Seems to me like a lot of folks have been posting that they have been having issues with this due to the various ways of printing to pdf.


Anyway - I suppose it is really possible that I simply /renamed/ the pdf prior to publishing - whereas the pages doc was not renamed before printing to pdf - which would be a good reason for there being a discrepancy.


However, in the case of someone giving me a pdf, and where I have edited in in Acrobat Reader - I can't see why I shouldn't be able to edit a bad Title so that it shows up to match the File Name...


I'll keep it moving and thanks for the push.


- jon

Dec 25, 2011 3:13 PM in response to hotwheels22

(1) Just for the sake of curiosity I looked at the PDF 1.7 specification (freely available from the Adobe PDF Reference Archive). On page 843 it states clearly, "A document’s metadata may also be added or changed by users […]", so that's that.


(2) On second thoughts, it seems to me that what you want, hotwheels 22, is to get the file name (minus file name extension) and insert it in the Title PDF metadata field. Neither of the tools I suggested can do this automatically, because the file name is variable. (Of course, they can do it file by file, but what's the point of having a computer if one can't do batch processing?) Automator should have been the right tool, but, unfortunately, Set PDF Metadata does not accept variables as inputs. Equally unfortunately, AppleScript does not have a means of editing PDF metadata.


So, to insert variable strings in PDF metadata by batch processing you need something else. There may be free scriptable GUI tools out there, but I don't know any (neither Preview nor ColorSync Utility are scriptable, nor is PDFInfo which I suggested above). So it's down to CLI tools (which can be called in AppleScript with the do shell script command). Pdftk, suggested by kurt188, is one; ExifTool is another; and Calibre also comes with a CLI component.

Dec 25, 2011 3:56 PM in response to fane_j

Hi Fj.


Thank you for this info and this help.


Referencing the specification is a nice idea. On some of this stuff though the explanations sort of fly over my head if I don't ask a follow up.


I think I checked today and Acrobat Pro is like 500 U.S. which is way more than I want to spend on this and - at the moment anyway - it is only an issue with a handful of files that I am posting to Google Docs. For some bizarre reason it is showing the "Title" when I am not even really sure /how/ my pdf's /get/ a title. I mean, I only noticed this because there is a difference between these both in terms of files that were given to me and by ones I created on my own.


So, I mean if I want to just change this manually can you explain what your recommendation was again because I /can't/ just do this in Google Docs and it looks really dumb and confusing the way it is.


I mean, assuming I can do it manually with no need for batch processing...?


Also, it is sort of a bummer that I can see this info so easily in Preview but I can't edit it. Just throwing that in since it /seems/ like such a trivial item and it is also really bizarre to have a title totally different from the file name without knowing when I encoded this data...


THANK YOU

Jan 1, 2012 3:12 PM in response to fane_j

Hi FJ.


Thank you for the help here.


Unfortunately for some reason PDFInfo is not giving google info it understands and the edited titles are coming up mostly question marks. I simply Choose a file and then I copied the File Name, checked Title and pasted this file name into the Title box. Then I clicked OK.


Does anyone know of something else I can try for this?


Since I did not create these documents I cannot go in and edit the Title name in Inspector in Pages as someone kindly suggested for these.


THANKS

Jan 1, 2012 4:52 PM in response to hotwheels22

hotwheels 22 wrote:


Unfortunately for some reason PDFInfo is not giving google info it understands

What info does 'google' understand?

edited titles are coming up mostly question marks

Give an example of a file name that does that.

Then I clicked OK.

Then open the PDF in Preview and inspect the metadata. Is it what you expect?

something else I can try for this

Open a PDF in Preview and print to PDF (print, not save). If the document is not protected, you will be able to enter new author, title, etc, in the save dialogue.


And you already have something else. It's called Set PDF Metadata in Automator, as I told you above.

How to edit PDF METADATA

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.