02-21-2014, 01:35 PM | #1 | |
Wizard
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
XMP Metadata in PDF ?
"What's new" for release 1.25 says this:
Quote:
If I wanted to put metadata in calibre into PDF files, exactly where and how would I do that? |
|
02-21-2014, 02:29 PM | #2 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
I assume like all metadata saving it will happen automatically?
The difference is, now PDF gets that to begin with. Save to disk or convert it. |
Advert | |
|
02-21-2014, 04:39 PM | #3 |
null operator (he/him)
Posts: 20,544
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Did a Save to disk - did not add the metadata
Did a PDF to PDF conversion and it did inject the metadata, and I can 'see' it in Acrobat, PDF XChange and Nitro, but they're limited in what they display. Acrobat & XChange show Comments as un-rendered HTML in Subject, Nitro has nothing there. Subject is a single line of text usually used for something like 'Genre', so I'm not sure about having Comments there. BR |
02-21-2014, 07:44 PM | #4 |
Wizard
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
I also tested PDF save to disk, which didn't add any extra metadata that I could find.
After PDF to PDF conversion, Adobe reader (on OS X) shows unrendered HTML from Comments in Subject, while Skim shows Subject as blank. Neither reader application showed metadata from custom columns. On the 2 PDFs I tested, anyway. If all that metadata is being stored in the PDF, where is it stored and how does one access it from within the PDF reader, if not in "Properties" or "Get Info"? Or if it wasn't stored in those tested PDFs but could have been, with some arcane technique, what is the arcane technique? ETA. And does it depend on various security settings of the PDF file? Last edited by unboggling; 02-21-2014 at 08:18 PM. |
02-21-2014, 08:48 PM | #5 |
creator of calibre
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The vast majority of PDF readers dont support XMP metadata, which is why I never bothered adding support for it to calibre for such a long time. If you want to see the metadata, add the PDF file again to calibre.
|
Advert | |
|
02-21-2014, 09:23 PM | #6 | |
Wizard
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
Quote:
http://en.wikipedia.org/wiki/Extensi...adata_Platform Skim doesn't support XMP. According to Adobe, Adobe Reader does support it, but even so, I found no way to display XMP in Adobe Reader. I let ownership of Acrobat lapse a year or two ago (and won't buy it again just for this). Just installed ExifTool, but I'm not very good with command line applications. Last edited by unboggling; 02-21-2014 at 09:27 PM. |
|
02-21-2014, 09:28 PM | #7 |
creator of calibre
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Indeed, the only reason XMP support was added at this time was that there is now at least one academic publisher (Elsevier) that does produce PDF files with good XMP metadata, thus it made sense to read XMP metadata. And if you read it, then you have to write it as well, otherwise you get bug reports like I changed the metadata but it doesn't show up in the PDF.
|
02-21-2014, 10:07 PM | #8 | ||
Wizard
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
Quote:
Quote:
|
||
02-21-2014, 10:14 PM | #9 |
creator of calibre
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You sure you dont have the pdf metadata reader/writer plugins disabled? I just tried the following experiment:
1) Import a pdf into calibre 2) Edit the value of a custom 3) Save the pdf to disk 4) Import the saved pdf back into calibre (and allow adding of the duplicate) 5) the newly added duplicate has the edited value from step (2) in the custom column |
02-21-2014, 10:50 PM | #10 |
Wizard
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
PDF metadata reader and writer plugins are not missing or disabled.
When I do those 5 steps, with "save metadata in OPF file" turned off, the newly added duplicate shows no values in the custom columns that were edited before the save to disk. With "save metadata in OPF file" turned on, the custom columns of the saved-out re-add are populated correctly. But that's because of the OPF, not the XMP. Are you saying the saved out PDF has those custom column values XMP embedded, and the new book record's custom columns should be filled automatically with those values during the Add Book creation of that new book record? If that's what's supposed to happen, it is not happening for me, when "save metadata in OPF file" is turned off during the save. Last edited by unboggling; 02-21-2014 at 11:12 PM. |
02-21-2014, 11:06 PM | #11 |
creator of calibre
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yes the custom columns are embedded in the PDF on save. They are read even if no OPF is present. You can look at their definitions by running
pdfinfo -meta file.pdf (pdfinfo is in the calibre install directory) |
02-21-2014, 11:45 PM | #12 |
null operator (he/him)
Posts: 20,544
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
restructured
Last edited by BetterRed; 02-22-2014 at 12:38 AM. |
02-21-2014, 11:45 PM | #13 |
Wizard
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
Eureka. Hooah. Success. I had "read metadata from file contents" turned off for the Add. With it turned on, the custom column metadata embedded in the pdf populates the custom columns. (Without the OPF present during the Add). So that confusion is solved.
This has nothing to do with conversion, just metadata read and write at import or export. So that confusion is solved. (ETA: Though conversion also updates the metadata in the output format.) But after installing command line tools with 1.25 on OS X: MacCatlin:frameworks unbogg$ pdfinfo -meta /users/unbogg/books/raw/_working/bazaar.pdf -bash: pdfinfo: command not found Like I said, I'm not real good with command line. Last edited by unboggling; 02-22-2014 at 03:26 AM. |
02-21-2014, 11:49 PM | #14 |
creator of calibre
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@unboggling: If you are on OS X pdfinfo will not be installed as a command line tool, you will need to find it inside the calibre application bundle.
@BR: covers are not inserted into PDF and all custom column metadata is inserted using a special namespace so it does not cause problems for any other application. |
02-22-2014, 12:19 AM | #15 | ||
Wizard
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
Quote:
Quote:
Though personally, I wish custom column metadata could be written into other formats besides PDF. Such as EPUB. |
||
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pdf, calibre and metadata. | Student1 | Calibre | 31 | 06-20-2014 03:47 AM |
PDF MetaData | dekz | Calibre | 5 | 06-10-2010 01:50 PM |
metadata and PDF | booksonthemove | Calibre | 6 | 03-13-2010 09:40 PM |
0.5.11 PDF metadata | thibaulthalpern | Calibre | 2 | 05-09-2009 09:14 AM |
pdf and other metadata | karl9000 | Calibre | 1 | 04-20-2009 02:04 PM |