Graphics, Figures & Tablespst-barcode / auto-pst-pdf failure

Information and discussion about graphics, figures & tables in LaTeX documents.
mikjsmith
Posts: 9
Joined: Fri Dec 24, 2010 10:18 pm

pst-barcode / auto-pst-pdf failure

Post by mikjsmith »

Hi

First posting to the board.... hope I get it right!

I used the following post (http://bramp.net/blog/latex-qr-based-business-card) to try to generate a QRCode under MiKTeX 2.7. I started with the code given on the page but couldn't get it to work so tried something minimalistic:

Code: Select all

\documentclass[11pt,a4paper]{memoir}
\pagestyle{empty}
\usepackage{pstricks}
\usepackage{auto-pst-pdf,pst-barcode}
\begin{document}
\begin{pspicture}(30mm,30mm)
\psbarcode{MECARD:N:Brampton,Andrew;EMAIL:a.bramptonATlancs.ac.uk;URL:http://bramp.net;;}{eclevel=L width=1.181 height=1.181}{qrcode}
\end{pspicture}
\end{document}
I gather the auto-pst-pdf package is needed when running under pdflatex. The packages were downloaded and installed but no QRCode shows up. Looking at the log file I get the following error:

Package auto-pst-pdf Warning:
Creation of bramp-autopp.dvi failed.
This warning occured on input line 124.
Package auto-pst-pdf Warning:
Could not create bramp-pics.pdf. Auxiliary files not deleted.
This warning occured on input line 124.

Looks like it couldn't create the QRCode image for some reason.... I tried running it under LaTeX (and removing auto-pst-pdf) and then viewing the DVI file. This worked fine, as did the conversion to PS. So I guess something is going wrong with auto-pst-pdf.

Any ideas for the failure at all??

cheers

mike
Last edited by mikjsmith on Sun Dec 26, 2010 1:59 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

pst-barcode / auto-pst-pdf failure

Post by CrazyHorse »

mikjsmith wrote:Hi
I used the following post (http://bramp.net/blog/latex-qr-based-business-card) to try to generate a QRCode under MiKTeX 2.7. I started with the code given on the page but couldn't get it to work so tried something minimalistic:
I gather the auto-pst-pdf package is needed when running under pdflatex. The packages were downloaded and installed but no QRCode shows up. Looking at the log file I get the following error:

Package auto-pst-pdf Warning:
Creation of bramp-autopp.dvi failed.
This warning occured on input line 124.
Package auto-pst-pdf Warning:
Could not create bramp-pics.pdf. Auxiliary files not deleted.
This warning occured on input line 124.
you have to run "pdflatex -shell-escape file" and need an installed Perl. You can get it from http://www.activestate.com/perl. See also:
http://tug.org/PSTricks/main.cgi?file=p ... autopstpdf

I have no problem with your example.

Herbert
mikjsmith
Posts: 9
Joined: Fri Dec 24, 2010 10:18 pm

Re: pst-barcode / auto-pst-pdf failure

Post by mikjsmith »

Many thanks; I had used the "-shell-escape" switch but hadn't spotted the requirement for Perl. The example I gave now works without problem. I've moved to my more complex example (we want to use it in typesetting for our journal) and it doesn't work; no graphic is produced and there is a very odd recursive loop in setting the headers for the first page that ends up trailing over 3 pages. The logfile, to my untrained eye, shows nothing desperately untoward other than:

Package auto-pst-pdf Warning:
Creation of zupan_qr_short-autopp.dvi failed.
This warning occured on input line 124.
Package auto-pst-pdf Warning:
Could not create zupan_qr_short-pics.pdf. Auxiliary files not deleted.
This warning occured on input line 124.

I have taken one of the articles and just presented the front page; attached is the tex and preamble file. Probably not the best example of Latex!! There are quite a few packages and whilst all are not used in this example they are all regularly used hence the reason they are in the template. My suspicion is that this could be related to any one of the other packages loaded or the order in which they are loaded.

Any thoughts as to the problem here at all?? Or a better way of isolating the problem?

thanks

mike

cheers

mike
Attachments
JoM_preamble_qr.tex
(2.63 KiB) Downloaded 380 times
zupan_qr_short.tex
(1.9 KiB) Downloaded 340 times
mikjsmith
Posts: 9
Joined: Fri Dec 24, 2010 10:18 pm

pst-barcode / auto-pst-pdf failure

Post by mikjsmith »

P.S. i installed ActivePerl, but use both the installed version of MiKTeX and portable MiKTeX. I see that Strawberry Perl (http://strawberryperl.com/releases.html) has a portable version and wondered if I could use psbarcdoe with this?? Does it use Window environment variables of file association? Or is the location hard coded?
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

pst-barcode / auto-pst-pdf failure

Post by CrazyHorse »

mikjsmith wrote:P.S. i installed ActivePerl, but use both the installed version of MiKTeX and portable MiKTeX. I see that Strawberry Perl (http://strawberryperl.com/releases.html) has a portable version and wondered if I could use psbarcdoe with this?? Does it use Window environment variables of file association? Or is the location hard coded?
For TeX it is not important what kind of Perl is installed.

Herbert
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

pst-barcode / auto-pst-pdf failure

Post by CrazyHorse »

mikjsmith wrote:Many thanks; I had used the "-shell-escape" switch but hadn't spotted the requirement for Perl. The example I gave now works without problem. I've moved to my more complex example (we want to use it in typesetting for our journal) and it doesn't work; no graphic is produced and there is a very odd recursive loop in setting the headers for the first page that ends up trailing over 3 pages. The logfile, to my untrained eye, shows nothing desperately untoward other than:
I have no problem with your example.

Herbert
mikjsmith
Posts: 9
Joined: Fri Dec 24, 2010 10:18 pm

Re: pst-barcode / auto-pst-pdf failure

Post by mikjsmith »

Hi Herbert

Many thanks for your help. I tried this with both my "vanilla" install of MiKTeX 2.7 and the portable version. I get the same problem. Ive attached the log file and output PDF to show what the exact problem is and whether there is something painfully obvious that I am not aware of that I've done wrong.

best wishes

mike
Attachments
zupan_qr_short.log
(8.96 KiB) Downloaded 326 times
zupan_qr_short.pdf
(104.12 KiB) Downloaded 361 times
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

pst-barcode / auto-pst-pdf failure

Post by CrazyHorse »

mikjsmith wrote: Many thanks for your help. I tried this with both my "vanilla" install of MiKTeX 2.7 and the portable version. I get the same problem. Ive attached the log file and output PDF to show what the exact problem is and whether there is something painfully obvious that I am not aware of that I've done wrong.
Mike,
do not use the oüptional argument [pdftex] when you load the graphicx package.
Itt is in general not needed and gives a wrong pdf here, because the document
needs to be run one times in dvi mode, which is not possible when you have this option set. Attached my created pdf:

Herbert
Attachments
zupan_qr_short-pics.pdf
my pdf-output
(1.82 KiB) Downloaded 313 times
mikjsmith
Posts: 9
Joined: Fri Dec 24, 2010 10:18 pm

Re: pst-barcode / auto-pst-pdf failure

Post by mikjsmith »

Hi Herbert

Have now upgraded to 2.9 (both portable and installed) and the QRCode has now disappeared again (using the same code)!

The error from the log file is:

Package auto-pst-pdf Warning:
Creation of malvic-pics.pdf failed.
This warning occured on input line 124.

Package auto-pst-pdf Warning:
Could not create malvic-pics.pdf. Auxiliary files not deleted.
This warning occured on input line 124.

The auto-pp.pdf file is created but the pic.pdf file is NOT created (i.e. the QRCode is generated but it isnt cropped for some reason). A tmp-pdfcrop.tex file is left behind.

ANy thoughts what might be the problem here? ActivePerl is installed, but I assume when it shells out to crop something is failing.

best wishes

mike
mikjsmith
Posts: 9
Joined: Fri Dec 24, 2010 10:18 pm

pst-barcode / auto-pst-pdf failure

Post by mikjsmith »

Further to my last message, I tried the same file again and get the log file output below. This shows that ps2pdf is failing. The QRCode is created in the autopp.ps file, but not converted to the PDF and then not cropped.

Not sure why this is happening. Any thoughts much apprecaited.

best wishes

mike

Code: Select all

runsystem(echo "auto-pst-pdf: Auxiliary LaTeX compilation")...executed.
runsystem(del "malvic-autopp.log")...executed.
runsystem(del "malvic-autopp.dvi")...executed.
runsystem(del "malvic-autopp.ps")...executed.
runsystem(latex -disable-write18 -jobname="malvic-autopp" -interaction=batchmode  "\let \APPmakepictures \empty \input  malvic.tex")...executed.
runsystem(dvips -Ppdf -o "malvic-autopp.ps" "malvic-autopp.dvi")...executed.
runsystem(ps2pdf  "malvic-autopp.ps" "malvic-autopp.pdf")...executed.
Package auto-pst-pdf Warning: 
    Creation of malvic-autopp.pdf failed.
This warning occured on input line 124.
Package auto-pst-pdf Warning: 
    Could not create malvic-pics.pdf. Auxiliary files not deleted.
This warning occured on input line 124.
runsystem(echo "auto-pst-pdf: End auxiliary LaTeX compilation")...executed.
Attachments
malvic.tex
(23.41 KiB) Downloaded 350 times
JoM_preamble.tex
(4.6 KiB) Downloaded 332 times
Post Reply