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

Werner Grundlingh wgrundlingh at gmail.com
Mon Aug 1 10:15:12 CEST 2011


Here are the steps you need to follow:
[1] Generate the barcode in myfile.tex. Be sure to add
\pagestyle{empty} to the single-page document/pspicture.
[2] latex myfile.tex
[3] dvips -E myfile.dvi -o myfile.ps
[4] If the bounding box is not tight enough around the image after [3], use
  epstool --copy --bbox --gs "C:\Program
Files\Ghostscript\gs9.02\bin\gswin64c" myfile.ps myfile.eps
[5] epstopdf myfile.eps --outfile=myfile.pdf

Explain a little more about your second request, since it is not 100%
clear to me what you mean. That is, \centering withing
\begin{figure}...\end{figure} centers its contents.

Werner

On Sun, Jul 31, 2011 at 08:29, Daniel Dehennin
<daniel.dehennin at baby-gnu.org> wrote:
> Hello,
>
> I'm playing with pst-barcode and business cards[1] and wonder how to
> calculate the size of the barcode.
>
> For now, each time I make a business card, I need to enable the
> pspicture grid and adjust the pspicture size to center the barcode.
>
> 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.
>
> Regards.
>
> Footnotes:
> [1]  http://www.baby-gnu.org/~nebu/perso/card/
>
> --
> Daniel Dehennin



More information about the PSTricks mailing list