I've searched and found many questions and answers regarding the use of auto-pst-pdf but none of them have helped me so far. My problem is that I'm generating a code 39 bar code, which does not always appear in the final pdf. I'm using a combination of LaTeX and Velocity, run through a Java Server environment on a Linux system.

First, are the packages included in the .tex file:

\usepackage[a4paper, landscape, margin=0.25in]{geometry}
\usepackage{longtable, tabu}
% the next three packages were added after reading some auto-pst-pdf 
% documentation and have had no effect

The bar code is generated as follows:

  \psbarcode{${workTicketId}}{includetext height=0.375}{code39}

PdfLatex is invoked by a java process using the following command:

pdflatex -shell-escape -enable-write18 template.tex

A resulting pdf is generated, just without the bar code. PdfLatex is started within the directory of the template.tex file. The directory containing all the files local to the template.tex file is in /tmp/report/. The user account which started the java process has full access and owership to the /tmp/report/ directory. The stout.log file contains warnings which seem to almost always appear if auto-pst-pdf has issues:

auto-pst-pdf: End auxiliary LaTeX compilation

Package auto-pst-pdf Warning: 
    Creation of template-autopp.dvi failed.
This warning occured on input line 124.

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

Finally, if I move the files from the /tmp/report/ directory to /home/me/report/ and run the same PdfLatex command - then auto-pst-pdf generates the bar code correctly and the resulting pdf contains said bar code. It is not an option to generate the reports within the users /home/ directory.

Any suggestions? Does someone see something that I've missed?

1 Answer 1


  \psbarcode{ABC12345}{includetext height=0.375}{code39}


If this works, then try to delete the [crop=off]

  • I'll give that try, thanks for the suggestion
    – user56494
    Commented Jul 5, 2014 at 15:34
  • There was no change in output and no additional errors. Thank you for your suggestion Herbert.
    – user56494
    Commented Jul 7, 2014 at 16:26
  • I suppose that auto-pst-pdf can't write into the tmp directory. Can you test the file permissions?
    – user2478
    Commented Nov 2, 2014 at 9:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .