[texhax] pst-barcode with pdflatex
Jeff Hamann
jeff.hamann at forestinformatics.com
Wed Sep 2 15:00:16 CEST 2009
Ah ha! Yeah! Awsome...
pdflatex -shell-escape <file>
works... almost...
\documentclass{article}
\usepackage{auto-pst-pdf,pst-barcode}
\begin{document}
\begin{pspicture}(-5mm,-3mm)(1.5in,1in)
\psbarcode
{9781860742712}{includetext guardwhitespace}{ean13}
\end{pspicture}
\vspace{0.5in}
\begin{pspicture}(-5mm,-3mm)(1.5in,1in)
\psbarcode
{9781860742712}{includetext guardwhitespace}{isbn}
\end{pspicture}
% these cause a problem, see below
% \vspace{0.5in}
% \begin{pspicture}(1in,1in)
% \psbarcode{http://www.dante.de}{}{qrcode}
% \end{pspicture}
% \vspace{0.5in}
% \begin{pspicture}(1in,1in)
% \psbarcode{Herbert Voss}{rows=48 columns=48 parse}{datamatrix}
% \end{pspicture}
\end{document}
yields the first two barcodes, but the qrcode and datamatrix codes
cause problems.
Error: /undefined in qrcode
Operand stack:
(http://www.dante.de) ()
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --
nostringval-- 2 %stopped_push --nostringval-- --
nostringval-- --nostringval-- false 1 %stopped_push 1905
1 3 %oparray_pop 1904 1 3 %oparray_pop 1888 1 3
%oparray_pop 1771 1 3 %oparray_pop --nostringval--
%errorexec_pop .runexec2 --nostringval-- --nostringval-- --
nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:1147/1684(ro)(G)-- --dict:0/20(G)-- --dict:104/200
(L)-- --dict:95/300(L)-- --dict:40/200(L)-- --dict:84/200(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 148737
GPL Ghostscript 8.63: Unrecoverable error, exit code 1
PDFCROP 1.5, 2004/06/24 - Copyright (c) 2002, 2004 by Heiko Oberdiek.
On Sep 2, 2009, at 1:23 AM, Herbert Voss wrote:
> Herbert Voss schrieb:
>> 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}
>
> \usepackage{auto-pst-pdf,pst-barcode}
>
> I forgot it ...
>
> running
>
> pdflatex -shell-escape <file>
>
> makes live easier
>
> Herbert
>
>
>> \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
>> _______________________________________________
>> TeX FAQ: http://www.tex.ac.uk/faq
>> Mailing list archives: http://tug.org/pipermail/texhax/
>> More links: http://tug.org/begin.html
>>
>> Automated subscription management: http://tug.org/mailman/listinfo/texhax
>> Human mailing list managers: postmaster at tug.org
>>
>
Jeff Hamann, PhD
PO Box 1421
Corvallis, Oregon 97339-1421
541-754-2457
jeff.hamann[at]forestinformatics[dot]com
http://www.forestinformatics.com
More information about the texhax
mailing list