On Wed, Jan 06, 2010 at 04:53:50PM -0700, michael geary <[email protected]>
wrote:
> i have a flash app that imports swf files that were converted
> automatically from 1-page PDFs. However, i'm now being asked to
> provide some sort of cropping mechanism. Basically, the scenario is
> that the user may only want to import a portion of the PDF (the user
> doesn't really see/know that the PDF is being converted to a swf).
>
> Is there any *nix-friendly (command line) tool that can take a swf (or
> it might make sense to do this to the PDF, though for UI reasons
> that's harder) and crop it based on a supplied rectangle?
If you want to crop it to e.g. x1:y1:x2:y2, you can do
swfcombine -d -X <x2-x1> -Y <y2-y1> -x <-x1> -y <-y2> file.swf -o file.swf
.
It's also possible to do this in pdf2swf during conversion, using the
syntax
pdf2swf -c <x1>:<y1>:<x2>:<y2> file.pdf -o file.swf
.
HTH,
Matthias