Generate barcodes in your latex document
Looking for generating barcodes or qr codes dynamically inside your document from a text string or a number?
You can use the pst-barcode package for latex. Below are the steps on how to set this up and use it.
Setup:
Go to the below link and download the package which will be available in .zip format.
http://www.ctan.org/tex-archive/graphics/pstricks/contrib/pst-barcode
Unzip the downloaded file and look for the 3 files mentioned below in the extracted folder.
pst-barcode.pro
pst-barcode.sty
pst-barcode.tex
Now all that remains is placing these files in the right location in your machine. Just go to the /usr/share/texmf folder and do the following:
Make 2 directories with names 'dvips' and 'tex/generic'.
Make a directory named pstricks in both of the above directories and also in the /textmf/tex/latex folder which is existing already.
And,
Move file 'pst-barcode.pro' to folder '/texmf/dvips'.
Move file 'pst-barcode.sty' to folder '/texmf/tex/latex/pstricks/'.
Move file 'pst-barcode.tex' to folder '/texmf/tex/generic/pstricks/'.
Now fire up a terminal and say.
sudo texhash
Now you can compile you texfile using this package and generate barcodes or qr codes.
You may download the sample file from here to get started.
Note : The compilation order needs to be as mentioned in the sample tex file provided i.e. latex -> DVItoPS -> PStoPDF.
You can use the pst-barcode package for latex. Below are the steps on how to set this up and use it.
Setup:
Go to the below link and download the package which will be available in .zip format.
http://www.ctan.org/tex-archive/graphics/pstricks/contrib/pst-barcode
Unzip the downloaded file and look for the 3 files mentioned below in the extracted folder.
pst-barcode.pro
pst-barcode.sty
pst-barcode.tex
Now all that remains is placing these files in the right location in your machine. Just go to the /usr/share/texmf folder and do the following:
Make 2 directories with names 'dvips' and 'tex/generic'.
Make a directory named pstricks in both of the above directories and also in the /textmf/tex/latex folder which is existing already.
And,
Move file 'pst-barcode.pro' to folder '/texmf/dvips'.
Move file 'pst-barcode.sty' to folder '/texmf/tex/latex/pstricks/'.
Move file 'pst-barcode.tex' to folder '/texmf/tex/generic/pstricks/'.
Now fire up a terminal and say.
sudo texhash
Now you can compile you texfile using this package and generate barcodes or qr codes.
You may download the sample file from here to get started.
Note : The compilation order needs to be as mentioned in the sample tex file provided i.e. latex -> DVItoPS -> PStoPDF.
Comments
Post a Comment