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!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- 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
