|  04-27-2015, 01:39 AM | #1 | |
| Junior Member  Posts: 6 Karma: 10 Join Date: Dec 2013 Device: Kindle Touch 3G / iPad Air2 |  Failed to embed metadata 
			
			What does mean the following error message when trying to embed metadata? Quote: 
 Last edited by mihal.v; 04-27-2015 at 01:43 AM. | |
|   |   | 
|  04-27-2015, 11:16 PM | #2 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			It means there is something about that PDF that causes PoDoFo to fail when trying to write updated metadata. Impossible to say what it is without access to the PDF.
		 | 
|   |   | 
| Advert | |
|  | 
|  07-11-2015, 03:50 AM | #3 | 
| Connoisseur            Posts: 92 Karma: 17950 Join Date: Mar 2013 Device: Xodo | 
			
			I also have this problem with some of the PDFs in my library. Code: calibre, version 2.31.0
WARNING: Failed for some files: Failed to embed metadata into some book files. Click "Show details" for details.
The PDF format of İskandinav Hikâyeleri Antolojisi:
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 365, in set_file_type_metadata
    plugin.set_metadata(stream, mi, ftype.lower().strip())
  File "/usr/lib/calibre/calibre/customize/builtins.py", line 502, in set_metadata
    set_metadata(stream, mi)
  File "/usr/lib/calibre/calibre/ebooks/metadata/pdf.py", line 160, in set_metadata
    return podofo_set_metadata(stream, mi)
  File "/usr/lib/calibre/calibre/utils/podofo/__init__.py", line 41, in set_metadata
    raise Exception('Failed to set PDF metadata in (%s): %s'%(mi.title, e.orig_tb))
Exception: Failed to set PDF metadata in (İskandinav Hikâyeleri Antolojisi): Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/utils/ipc/simple_worker.py", line 274, in main
    res = {'result':func(*args, **kwargs)}
  File "/usr/lib/calibre/calibre/utils/podofo/__init__.py", line 57, in set_metadata_
    p.open(u'input.pdf')
Error: An internal error occurred.I have this problem in multiple files. I wonder if there is a way to fix this? Last edited by canpolat; 07-11-2015 at 11:25 AM. Reason: Removed file link. | 
|   |   | 
|  07-11-2015, 06:24 AM | #4 | 
| Wizard            Posts: 1,166 Karma: 1410083 Join Date: Nov 2010 Location: Germany Device: Sony PRS-650 | 
			
			This happens because you have in your example a protected PDF file.
		 | 
|   |   | 
|  07-11-2015, 07:29 AM | #5 | 
| Connoisseur            Posts: 92 Karma: 17950 Join Date: Mar 2013 Device: Xodo | 
			
			@Divingduck: Thank you for the response. Do you know if there is a simple way to bulk-remove this sort of protection (within or outside Calibre)? I'm on Linux, by the way...
		 Last edited by canpolat; 07-11-2015 at 07:31 AM. Reason: Added platform. | 
|   |   | 
| Advert | |
|  | 
|  07-11-2015, 07:33 AM | #6 | 
| Connoisseur            Posts: 92 Karma: 17950 Join Date: Mar 2013 Device: Xodo | 
			
			I found this: http://stackoverflow.com/questions/1...files#14233759 I'll try and report back as soon as I can. | 
|   |   | 
|  07-11-2015, 12:21 PM | #7 | 
| Connoisseur            Posts: 92 Karma: 17950 Join Date: Mar 2013 Device: Xodo | 
			
			In case someone else stubmles accross this thread here is the solution. I ended up using qpdf: Code: qpdf --decrypt myfile.pdf decrypted.pdf | 
|   |   | 
|  | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Question about 'Embed metadata' tool | MartyTX | Library Management | 10 | 10-05-2022 03:44 AM | 
| Embed Metadata - Question, Suggestion and Error | ichbindasauge | Calibre | 2 | 07-24-2014 03:02 AM | 
| Adding comments to embed metadata | MichelleB | Conversion | 7 | 07-18-2014 11:13 AM | 
| 'Embed metadata' tool errors | kabirmaar | Calibre | 2 | 06-23-2014 02:30 AM | 
| Failed to download metadata (both metadata & cover) | EddieSean | Calibre | 0 | 01-31-2013 09:49 PM |