Home » » Bounding box for latex \includegraphics command

Bounding box for latex \includegraphics command


Type in a terminal window:
gs -sDEVICE=bbox -dNOPAUSE -dBATCH file.pdf (or file.ps)
you must have ghostscript installed of course. This command produces an output similar to this:

GPL Ghostscript 8.62 (2008-02-29)
Copyright (C) 2008 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusRomNo9L-Regu font from /usr/local/share/ghostscript/fonts/n021003l.pfb... 2395104 1083573 3646208 1812428 1 done.
%%BoundingBox: 203 545 350 699
%%HiResBoundingBox: 203.356189 545.703241 349.560341 698.957486
Then in the latex manuscript you can include the graphic by using
\includegraphics[bb = 203 545 350 699]{pathToTheFile/File}
The four numbers correspond to the bottom-left corner (203,545) and the top-right one (350,699). You can clip or pad the picture by changing this numbers, for example, if you need to cut the bottom part, change ’545′ by say ’570′ and add the ‘clip’ option to the includegraphics command as
\includegraphics[bb = 203 570 350 699,clip]{pathToTheFile/File}
That would do.

6 Comments:

sri said...

Thanks for sharing this informative content.,
Leanpitch provides online training in Scrum Master Certification , everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.

Scrum master certification online

CSM certification online

sri said...

Thanks for sharing this.,
Leanpitch provides online training in Scrum Master, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.

Scrum master certification

csm certification

sri said...

Excellent content ,Thanks for sharing this .,
Leanpitch provides online training in CSPO everyone can use it wisely.,
Join Leanpitch 2 Days CSPO Certification Workshop in different cities.

CSPO certification

Product owner certification

sri said...

Thanks for sharing this.,
Leanpitch provides online training in agile coach during this lockdown period everyone can use it wisely.

agile coach certification

icp acc certification

sri said...

Thanks for sharing this informative content.,
Turient is an All-in-one platform for all our teaching needs. If Teaching is your passion ,enabling is ours
Read the Informative blog - 11 Free Teaching Tools for Online Teachers

11 Free Teaching Tools for Online Teachers
Free Teaching Tools

sri said...


Thanks for sharing this informative content.,
Turient is an All-in-one platform for all our teaching needs. If Teaching is your passion ,enabling is ours
Read the Informative blog - 11 Free Teaching Tools for Online Teachers

Turient
Free Teaching Tools for Online Teachers

Popular Posts