You are not logged in.

#1 2012-06-14 03:21:58

kaikaizi
Member
Registered: 2010-05-11
Posts: 10

PdfCropper - scanned pdf cropping tool

I spent past few days on a png cropping program because I am not happy with some scanned pdf documents with broad useless margins, which makes viewing on my kindle a pain. There were some available tools on google code that achieve more sophisticated functions, which I found after debugging my C code. However, I tried to make it as simple as possible (<250 SLOC).

The other package that performs similar function: http://aur.archlinux.org/packages.php?ID=41400 seems to work on TeX formatting and doesn't handle pure-image based pdfs well. (It doesn't work on my box, somehow, for TeX generated pdfs)

The source file is posted here: https://github.com/kaikaizi/PdfCropper.git

The core part (pngCrop.c) requires only libpng on top of libc. The accompanying shell script that extracts scanned png images and combines processed ones to generate pdf requires `mupdf' and `imagemagick' packages respectively.

Tell me what you think about this utility. Thanks!

Offline

Board footer

Powered by FluxBB