View Single Post
Old 02-07-2024, 07:18 PM   #5
CaptainLexington
Junior Member
CaptainLexington began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2021
Device: Onyx Boox Palma
Quote:
Originally Posted by kovidgoyal View Post
Note that you dont need to use pypdf you can use the existing add_image_page() function in calibre.utils.podofo
I have gotten this working, but I'm not sure I like the white padding when the aspect ratio doesn't match. I'll have to try this on several books and see how I like it on my ereader.

Also, forgive me if this is the wrong place to ask, but I am having trouble understanding how to write the custom PDF metadata flag to indicate subsequent covers should overwrite the existing Page 1. I'm using podofo.set_metadata, and it doesn't crash anymore, but the flag I'm trying to save ("HasCustomPDFCover") isn't showing up in the XMP metadata when I reload the file.
CaptainLexington is offline   Reply With Quote