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
Graphics, Figures & Tables ⇒ viewport option for includegraphics
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
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
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10