ipe icon indicating copy to clipboard operation
ipe copied to clipboard

Crop images when exporting to png/svg

Open dominikscheder opened this issue 1 year ago • 1 comments

When parts of my ipe slides go beyond the "frame", they will be cropped out when saving as pdf (which it good; I want it that way). However, when I export to svg or png, the whole thing is shown, including stuff outside the frame.

How can I export a slide to svg and make sure the content is cropped to the frame? I would use this to create some "animations".

By the way, as far as I can tell, changing the "crop" attribute in

has no effect.

crop-or-not example-crop-no-crop.pdf

dominikscheder avatar Oct 28 '24 17:10 dominikscheder

The way it is now, you have to crop yourself:

https://otfried.github.io/ipe/30_objects.html#clipping

It wouldn't be difficult to always clip to the paper when exporting to SVG or PNG. But I suspect that there are people exploiting the fact that you can draw outside the paper...

The --nocrop option determines whether Ipe should use the bounding box of the objects on the page or the paper. It certainly makes a difference when you export to PNG. I guess we could introduce the semantics that with this flag we always crop to the paper size.

otfried avatar Oct 28 '24 21:10 otfried