[pstricks] pst-barcode: pspicture size calculation for automatic placement

Herbert Voss Herbert.Voss at FU-Berlin.DE
Mon Aug 1 10:40:16 CEST 2011


Am 31.07.2011 17:29, schrieb Daniel Dehennin:

> I would like to do it in two times:
>
> - Generate a standalone barcode in eps or pdf
> - Include the barcode and use the graphic geometry to center it
>
> I understand that LaTeX knows nothing on the barcode since it's generated
> at dvips time and wonder if there is any solution.

use auto-pst-pdf and run the document with

pdflatex -shell-escape <file>

it doesn't matter what unit you use for pspicture. The environment is
only needed to detect it by preview. you can always use
\begin{pspicture}(1,1)

In the following example I use only for demonstration 1mm,1mm
to let you see that this also works:

\documentclass{article}
\usepackage{pst-barcode}
\usepackage{auto-pst-pdf}
\begin{document}

foo
\begin{pspicture}(1,1)
\psbarcode{Herbert Voss ^142^164^186}{rows=48 columns=48 parse}{datamatrix}
\end{pspicture}
bar

\end{document}

Herbert


More information about the PSTricks mailing list