View Single Post
Old 10-25-2012, 05:43 AM   #14
annoporci
Enthusiast
annoporci began at the beginning.
 
Posts: 36
Karma: 10
Join Date: Oct 2012
Location: Los Angeles
Device: Kindle Paperwhite 2019, Firmware 5.12.4
pdfmanipulate gone

I have been using frabjous code in a batch file under windows for some time and with great success (combining ghostcript and pdfmanipulate). I recently updated calibre and it came to my attention that pdfmanipulate is no longer maintained and has been removed from recent releases of calibre, e.g. versions 9 and up.

You can still get pdfmanipulate from there:
http://sourceforge.net/projects/calibre/files/0.8.66/

I downloaded the portable version and removed files that are not needed (I do use calibre, but I have a more up-to-date version installed in a separate directory). I haven't been able to figure out what a minimal configuration would be yet, but this you need: pdfmanipulate.exe, pylib.zip and things inside the two directories DLLs and resources. You probably only need a small number of files from these two directories (it would be nice to know which ones, so as to package pdfmanipulate with its dependencies and nothing else).

Unless there is a superior alternative to pdfmanipulate? I find it does a great job, that's why I was keen on staying with it, but I'm not tied to it either...

EDIT: I found that I could still crop pdfs by keeping just freetype.dll, python27.dll, pywintypes27.dll (all three dlls inside the DLLs directory), and just default_tweaks.py (inside the resources directory), together with pdfmanipulate.exe and pylib.zip. It throws up harmless error messages, harmless as far as I can tell. The pylib.zip remains large at about 43MB, and presumably much can be removed from there too, but I haven't tried. So far I have reduced the directory from about 136MB to about 43MB. I would be surprised if it proved impossible to knock off about 40MB from that. But the process of removing files from pylib.zip and testing is tedious and my patience has run out.

Last edited by annoporci; 10-25-2012 at 09:57 AM. Reason: added precision
annoporci is offline   Reply With Quote