|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
|
What to do about "Failed to set metadata for the PDF format" on export?
Hi!
I regularly export the books in my library with embedded metadata (via calibredb export) so that other tools can see/index them. Now I get the following error: Code:
Failed to set metadata for the PDF format of: Owner's Manual – HS11/HS33 Traceback (most recent call last): File "calibre/utils/podofo/__init__.py", line 38, in set_metadata File "calibre/utils/ipc/simple_worker.py", line 256, in fork_job File "calibre/utils/ipc/simple_worker.py", line 181, in run_job File "calibre/utils/ipc/simple_worker.py", line 120, in communicate calibre.utils.ipc.simple_worker.WorkerError: Worker failed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "calibre/customize/ui.py", line 447, in set_file_type_metadata File "calibre/customize/builtins.py", line 544, in set_metadata File "calibre/ebooks/metadata/pdf.py", line 187, in set_metadata File "calibre/utils/podofo/__init__.py", line 42, in set_metadata Exception: Failed to set PDF metadata in (Owner's Manual – HS11/HS33): Traceback (most recent call last): File "calibre/utils/ipc/simple_worker.py", line 304, in main File "calibre/utils/podofo/__init__.py", line 99, in set_metadata_ podofo.Error: An internal error occurred. File: /private/var/folders/hb/2_22y10x72j2tltq8b0ygzp80000gn/T/t/podofo-avye7kfp/src/base/PdfParser.cpp Line: 272 Unable to load objects from file. File: /private/var/folders/hb/2_22y10x72j2tltq8b0ygzp80000gn/T/t/podofo-avye7kfp/src/base/PdfParserObject.cpp Line: 403 Unable to parse the stream for object 867 0 obj . File: /private/var/folders/hb/2_22y10x72j2tltq8b0ygzp80000gn/T/t/podofo-avye7kfp/src/base/PdfEncrypt.cpp Line: 411 Error AES-decryption data |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,198
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There's nothing to do. PODOFO cant handle that PDF. You could report it to them, but most likely the PDF file is broken in some way that makes editing it fail while simply viewing doesnt.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,906
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Look at the properties of the files (I used Acrobat Reader). I've attached an image of the security settings for a document that has password protected modification settings but allow opening/printing without a password.
|
![]() |
![]() |
![]() |
#4 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
|
Thanks for replying, but I don't think the PDF is broken. I reckon the problem is that the PDF does - as @DNSB pointed out - not allow to be modified.
|
![]() |
![]() |
![]() |
#5 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
|
Good point! That was indeed the problem: The PDF was not allowed to be modified. I fixed the write-permission issue by copying the content via the `qpdf` command line program:
Code:
qpdf --empty --pages <original.pdf> -- writable.pdf This is certainly not perfect, because I loose possible metadata from the original PDF, but at least I can export the PDF with the metadata from calibre. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,906
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
![]() |
![]() |
![]() |
Tags |
calibre, metadata |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre export to ePub fails: "Failed to initialize plugin: ... DeDRM.zip" | res555 | Conversion | 4 | 06-14-2022 10:55 PM |
Add date to "Title" for WSJ export to Kindle format | johnnymacg | Recipes | 0 | 05-07-2012 12:27 PM |
Error msg "Warning - failed to read metadata" | kloewen | Calibre | 2 | 06-08-2010 01:25 PM |
is it possible to set mobipocket "subject" metadata from calibre? | rheostaticsfan | Calibre | 3 | 05-20-2010 08:44 AM |
Request Some suggestions for "export to PDF" option | soilwork | enTourage Archive | 4 | 04-30-2010 09:29 PM |