[pstricks] How to make a minimal PDF image

Carsten Vogel texnicer at web.de
Tue Aug 9 21:48:54 CEST 2011


Am 09.08.2011 19:03, schrieb Nick Ruiz:
> Hello,
>
> I understand that pspicture doesn't work with pdflatex. As a result, I
> need to generate pdf files for each of my pspictures to include in my
> main pdf document via the \includegraphics command.

My "workingtitle" approach has a flaw: you need to pdftk-extract the 2nd 
page since I was not able to stop it from floating. But like this 
(adjust papersize to pspicturesize) you should be able to have an exact 
match. Remember "dimen"-option, since some lines are outside the pspicture.
   On can also think of a "padding" within the "paper", but this leads 
like having shifted pspicture-sizes to math in the paperformat. Yet I 
could not figure out that "happy"-value that satifsfy the placer-algorithm.

So for q&d and subject to your thoughts:

\documentclass[pagesize,parskip]{scrartcl}
\usepackage[margin=0mm,nohead,nofoot,paperheight=1cm,paperwidth=2cm]{geometry}
\usepackage{pstricks}

\pagestyle{empty}
\psset{yunit=-1cm}

\begin{document}\nopagebreak%
\begin{pspicture}(1,2)%
\psframe[dimen=outer,linecolor=blue](2,1)
\end{pspicture}%
\end{document}


More information about the PSTricks mailing list