03-07-2011, 10:39 PM
I have been doing some Bulk Metadata editing, mostly extracting PDFs' first page as the cover, and sometimes, on some PDFs this causes Calibre to crash and close. I have found some culprits (manually) and simply deleted the book, but I wonder if there's a way to autoscan for damaged or whatever it is about some PDFs that cause this to happen, because my libraries are huge and I don't always find the culprits. This will happen even if I do it individually on the guilty books, so it's not a matter of bulk editing being the problem, as once the problem books are removed it works without a hitch.
03-07-2011, 10:51 PM
Go to preferences plugins and disable the PDF metadata reader plugin. The downside is that you will not get any covers or other metadata from the PDF file.
03-08-2011, 01:51 AM
Thanks, but my goal is to get the covers from the PDF files, so that's not an option, though it's good to know it's possible.
I will just continue to do as I've been doing and delete the offending books from my library unless there's another suggestion.
Out of curiosity, any idea what causes this to happen?
03-08-2011, 02:00 AM
Okay, I have a theory:
Corrupted PDF files that cannot be opened in Adobe Acrobat Pro do not cause a crash, but nor (obviously) can a cover be extracted from them.
Twice I have had a crash (Calibre shutsdown in the middle of the bulk processing) when the PDF file had a huge first page (the cover picture) and all following pages were smaller. So maybe trying to extract too big a picture for the cover is causing this issue. When I copy the page in Adobe Acrobat I can paste it in the edit individual metadata section fine, and when I view from Calibre, it opens the file with Adobe Acrobat just fine, but if I try to extract/get cover from the file, it crashes. In bulk and individual edit metadata mode.
Any idea how to shrink the initial (cover) page in a PDF file so it's the same size as the other pages)
03-08-2011, 02:11 AM
What is the page size of your PDF files?
03-08-2011, 02:11 AM
Okay, so I opened the PDF in Adobe Acrobat zoomed to 4% (this is when the cover shows at the correct size), copied the page, pasted it into MSPAINT and it was the correct size still. Then I simply pasted (it's already in the clipboard so didn't even have to copy from MSPaint) it back into the PDF file between the cover (huge original one) and the normals size first page of text. I then deleted the huge original cover page, saved the PDF (it did add a little size to the file, probably because I messed with it's chi, but whatever. Then I went to Calibre and it was able to extract the cover like normal, so the problem is solved it would seem. Maybe it'll help someone else too. Although, I still don't have an automatic way of finding the PDFs with too big of a cover page that will cause this problem or corrupted PDFs that will just not allow opening and therefore extraction of the cover.