Page Layout ⇒ PDF Page Size fits Text
PDF Page Size fits Text
How can I fix the page size of the PDF to fit the text, i.e no margins at all? I am wondering if there is a command or a page options that does it automatically.
Ultimately I want to create only a line of text or symbols and use the pdfs as vector images, so I don't want any white margines/space surrounding the text.
Thank you!
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
PDF Page Size fits Text
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
PDF Page Size fits Text
Code: Select all
\documentclass{article}
\usepackage[<active>]{preview}
\begin{document}
test
\end{document}
Thanks in advance!
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
PDF Page Size fits Text
Code: Select all
\documentclass{article}
\usepackage[active,tightpage]{preview}
\begin{document}
\begin{preview}
Test
\end{preview}
\end{document}
The standalone class makes this easier.
Code: Select all
\documentclass{standalone}
\begin{document}
Test
\end{document}
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: PDF Page Size fits Text
I spent the entire day looking for an easy solution to crop the pdf with at third party software with no luck. you have saved me time and money
