Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 12-27-2020, 08:14 PM   #1
halloleo
Groupie
halloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
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
How can I fix this? It looks like that one particular book ("Owner's Manual – HS11_HS33.pdf") has some encryption set, but I can view the file without any password, so I don't understand why calibe has problems setting metadata.
halloleo is offline   Reply With Quote
Old 12-27-2020, 10:45 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-27-2020, 10:54 PM   #3
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
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.
Attached Thumbnails
Click image for larger version

Name:	PDF_Security.png
Views:	341
Size:	59.6 KB
ID:	184298  
DNSB is offline   Reply With Quote
Old 12-31-2020, 03:40 AM   #4
halloleo
Groupie
halloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
Quote:
Originally Posted by kovidgoyal View Post
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.
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.
halloleo is offline   Reply With Quote
Old 12-31-2020, 03:53 AM   #5
halloleo
Groupie
halloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
Quote:
Originally Posted by DNSB View Post
Look at the properties of the files.
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
Then I copied writable.pdf into the calibre database.

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.
halloleo is offline   Reply With Quote
Advert
Old 12-31-2020, 02:43 PM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 44,906
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by halloleo View Post
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
Then I copied writable.pdf into the calibre database.

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.
Good to hear that you found a workaround.
DNSB is offline   Reply With Quote
Reply

Tags
calibre, metadata

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 02:48 AM.


MobileRead.com is a privately owned, operated and funded community.