Similar to Save tikz picture to disk but more general.

\SaveRegion{filename}{ ... latex code here ... }

would save whatever graphics is generated by the latex code here to an image.

I do not believe latex has such capabilities. (any post processing such as overlays and stuff would probably not be saved)

Therefore, what i would like to do is be able to extract the page number and "coordinates" of the bounding box of the enclosed code which I could then use to get the image from the pdf/div/ps/etc...

i.e., \SaveRegion gives all the necessary information to be able to extract the image after the pdf is generated(which I would also need to know how to do but it is probably straight forward). (and if \SaveRegion could save the image then that would probably be best)

Does anyone have an idea how to implement a type of \SaveRegion?

1 Answer 1


There is no general way to do this. You have no reason to expect that the code you are placing inside your special environment is necessarily going to print output within a convenient one-page box. Material for example set inside a zero-width box may cross the bounding box, but does this count as printed or not?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .