View Single Post
Old 12-11-2010, 03:42 AM   #1
Junior Member
metafractal began at the beginning.
Posts: 3
Karma: 10
Join Date: Dec 2010
Device: EcoReader (Hanlin)
Plugin to split pages down the middle

A problem I often encounter is that the books I want to read are pdfs with two portrait pages contained in each landscape page. This is practically unreadable on my device. I found this script fixes the problem by splitting the pages down the middle, creating two new portrait pages for each 2-up page. It would be really nice if I were able to run this directly from inside Calibre rather than needing to run it manually on the files in my library and then re-import the processed books.

I'd like to write a plugin to do this, but I have limited programming experience and am having trouble knowing where to start. At first I thought that I needed to write a File Type plugin, but on closer examination this does not seem like it would work since they are run only when a book is converted or imoprted. A Conversion plugin seems to be more appropriate, but I'm having trouble understanding the documentation.

Any tips to help me get started or, even better, snippets of code would be much appreciated!

metafractal is offline   Reply With Quote