01-06-2021, 03:20 AM | #1 |
Groupie
Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
|
Exported ePUBs stay the same, exported PDFs always change.
I regularly export my library (to make the books available to tools) via calibredb export.
I export the books into a temp directory and then compare with the last export. In doing so I have noticed that ePUB files stay fully the same when no change to the metadata in calibre has happened since the last export. (And thus I have no need to copy them to the final destination.) However PDF files seem to change even when no modification to the metadata in calibre has happened. This is pretty annoying, because it means I have to copy the PDFs to the destination even if nothing has changed. The change seems to be only on the byte level, when looking at the PDF it looks still the same, of course. Why do PDFs not behave like ePUBs and how can I avoid it? ps: I use the options --single-dir --progress --dont-write-opf --dont-save-cover. pps: I cannot use --dont-update-metadata, because I need the calibre metadata in the exported file. |
01-06-2021, 03:43 AM | #2 |
creator of calibre
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
This is a feature of PDF. To update metadata in it, even if the new metadata is not different, the files internal structures have to be changed.
|
Advert | |
|
01-09-2021, 09:43 PM | #3 |
Groupie
Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
|
Thanks for the info.
Interesting! Sorry to bother, but I'm curious, is there any explanations why the PDF has to change when nothing of the data (content or metadata) changes? Is this caused by the particular PDF library? |
01-09-2021, 11:20 PM | #4 |
creator of calibre
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
pdf is internally an object filesystem that uses numbers as object names. When changing anything in a PDF, one has to create/delete objects in that filesystem, and doing this in a way thathas no side effects is fr from trivial.
|
01-10-2021, 09:02 AM | #5 |
Groupie
Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
|
Great detailed explanation. Makes sense.
|
Advert | |
|
Tags |
calibre, export, export library |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aura Annotations exported to the PC? | Beniamina | Kobo Reader | 6 | 09-16-2017 11:22 AM |
Formatting of exported annotations | bounce | Marvin | 5 | 07-29-2016 04:25 PM |
[marvin] exported annotations in xhtml | tsolignani | Apple Devices | 8 | 02-18-2013 07:59 AM |
Indesign-exported pdf to epub | eagles1972 | Conversion | 0 | 01-12-2012 01:24 AM |
Books blank when exported | Joosca77 | Library Management | 2 | 06-10-2011 11:33 PM |