Graphics, Figures & Tablesviewport option for includegraphics

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
neumannturing
Posts: 32
Joined: Sun Mar 01, 2009 8:29 am

viewport option for includegraphics

Post by neumannturing »

Hello,
some program like Matlab can output its generated figures to pdf format. But there is a huge blank space above and below the image in the pdf file. viewport seems to be a option to clip the part of the pdf. But viewport requires 4 parameters measure as pixel. How can I tell the upper left and bottom right of pdf where my image occupy ? Is there any good way to handle this problem?
Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

viewport option for includegraphics

Post by localghost »

The graphicx manual gives some useful information about that. The keywords are the trim and viewport option for the \includegraphics command. Another possible solution is a Perl script called pdfcrop which cuts PDF files to size.


Best regards
Thorsten
Post Reply