General ⇒ Barcodes in LaTeX (code128)
Barcodes in LaTeX (code128)
I need to use bascodes (code128) in my documents (PDF-files).
I use next:
\usepackage{pst-barcode,pstricks-add}
\psset{unit=1in}
\begin{pspicture}(3.5,1.2)
\psbarcode{12345678}{includetext}{code128}
\end{pspicture}
,but page is empty.
Maybe I have to install something else?
And how can check that pst-barcode have installed corectly?
Maybe you know another way to print barcodes?
Thank you.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Barcodes in LaTeX (code128)
please take into account the notes in the pst-barcode documentation (page 11) regarding code128:
documentation wrote: 4.9 Code-128 and UCC/EAN-128
Characters !"#$%&’\(\)*+,-./0...9:;<=>?@A...Z[\\]^_‘a...z{|}~
Data Variable number of ASCII characters and special funtion symbols, starting with the approriate start character for the initial character set. UCC/EAN-128s must have a manditory FNC 1 symbol immediately following the start character...
Code: Select all
\documentclass[a4paper,12pt]{report}
\usepackage{pst-barcode,pstricks-add}
\begin{document}
\psset{unit=1in}
\begin{pspicture}(3.5,1.2)
\psbarcode{^10412345678}{includetext}{code128}
\end{pspicture}
\end{document}
- Attachments
-
- test.pdf
- (4.24 KiB) Downloaded 895 times
Re: Barcodes in LaTeX (code128)
I used your way:
1. Make file test.tex:
\documentclass[a4paper,12pt]{report}
\usepackage{pst-barcode,pstricks-add}
\begin{document}
\psset{unit=1in}
\begin{pspicture}(3.5,1.2)
\psbarcode{^10412345678}{includetext}{code128}
\end{pspicture}
\end{document}
2. texi2dvi test.tex -> ok
3. dvipdfm -p a4 -o test.pdf test.dvi -> errors:
test.dvi -> test.pdf
[1
Unrecognized special ignored
Current input buffer is -->header=pstricks.pro<--
Unrecognized special ignored
Current input buffer is -->header=pst-dots.pro<--
Unrecognized special ignored
Current input buffer is -->header=pst-barcode.pro<--
Unrecognized special ignored
Current input buffer is -->header=pst-node.pro<--
Unrecognized special ignored
Current input buffer is -->header=pst-eqdf.pro<--
Unrecognized special ignored
Current input buffer is -->" tx@Dict begin STP newpath 0.8 SLW 0 setgray g...
<--
]
5211 bytes written
4. test.pdf is empty page without barcode.
What I need to do to solve my problem?
Thank you.
Re: Barcodes in LaTeX (code128)
latex test.tex (or texi2dvi test.tex)
dvips test.dvi
ps2pdf test.ps
Re: Barcodes in LaTeX (code128)
I use FreeBSD 6.1.
For 'latex' command I have installed 'teTeX-base' package.
And when I tried to istall DVIPS package for 'dvips' command,
I had an error, that DVIPS and teTeX-base conflicted. And I need to use only one.
But DVIPS dont have 'latex' command...
What packages I need to install for use next command:
- latex
- dvips
- ps2pdf
Thank you.