[texhax] pst-barcode with pdflatex
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Wed Sep 2 10:12:31 CEST 2009
Jeff Hamann schrieb:
> I'm guessing this isn't a new question, but I've having a little trouble
> getting traction on a solution.
>
> I've been trying to use pst-barcode with pdflatex with no success.
>
> I've tried just about every combination of options from the pst-barcode
> examples I could find.
>
> Is there a solution?
\documentclass{article}
\usepackage{pst-pdf,pst-barcode}
\begin{document}
\begin{pspicture}(-5mm,-3mm)(1.5in,1in)
\psbarcode
{9781860742712}{includetext guardwhitespace}{ean13}
\end{pspicture}
\end{document}
with latex->dvips->ps2pdf you'll get a pdf file with the
bounding box of (-5mm,-3mm)(1.5in,1in)
running the file with the script ps4pdf <file> you'll
get a letter sized pdf with the barcode
alternative run (it is what the script ps4pdf does)
latex <file.tex>
dvips -Ppdf -o <file-pics.ps> <file.dvi>
ps2pdf -dAutoRotatePages=/None <file-pics.ps> <file-pics.pdf>
pdflatex <file.tex>
Herbert
More information about the texhax
mailing list