Hi, is there an automatic way (a package perhaps) to set up the page size exactly to the content of the pdf with no margins, header or footer (or page number). For example, I need a single equation line to appear in the pdf without any white margins surrounding it, and I need to create such equations repeatedly. So, is there a way to define something in the preamble such that whatever I type between \begin{document} and \end{document} will appear by itself without any margins.
Reason (in case you are interested or might have other suggestions):
I’m creating a poster with illustrator and using latex to produce the equations and figures. After creating the pdf (from latex) I just drop it into illustrator and it will be automatically treated as a vector image (as expected). But, it is not possible to crop the vector images in illustrator which means that all the white spaces created by latex in the pdf will be hard to remove, and hence, I would have to set the page size to that exactly that of the equation/figure for each equation/figure, which is time consuming and frustrating.
Thanks very much!
Page Layout ⇒ Page setup with no margins
Page setup with no margins
Last edited by haaj86 on Tue Aug 03, 2010 10:38 am, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Page setup with no margins
LaTeX.org admin
Page setup with no margins
Thanks Stefan, I installed the pdfcrop package using the package manager, but I get an error when I compile the code.
Can you please suggest how to use it exactly? is this valid:
I appreciate it a lot.
Can you please suggest how to use it exactly? is this valid:
Code: Select all
\documentclass{article}
\usepackage{pdfcrop}
\begin{document}
Testing
\end{document}
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Page setup with no margins
Use it at the command prompt (Windows-key + R or Start/Run: cmd)
Stefan
Code: Select all
pdfcrop filename.pdf
LaTeX.org admin
Re: Page setup with no margins
Thanks! I installed Perl and run the command line as you have suggested and it worked perfectly.