# xdvipdfmx:fatal: File ended prematurely Error 256 (driver return code) generating output

I try to set up auctex. It basically works now and I can compile and view simple files from within emacs. But there is one file working with includes that gives me:

xdvipdfmx:fatal: File ended prematurely

No output PDF file written.
(see the transcript file for additional information)


There are no other error messages. auctex calls xelatex -file-line-error -interaction=nonstopmode check-gt.tex.

This works without problems from the shell but fails from within emacs. Any ideas what to do about this?

Edit 1:

I could track it down to one package. The package for barcodes:

\documentclass{article}

\usepackage{pst-barcode}

\begin{document}

\begin{pspicture}(0,0)(4.1,1in)
\psbarcode[transx=.4,transy=.3]{978-3-96110-202-0}{includetext height=.7}{isbn}%
\end{pspicture}

\end{document}


This compiles with xelatex in the shell but causes trouble in auctex.

• Can you add code for a small file that shows this issue to your question? May 1, 2020 at 15:35
• I edited the file. May 1, 2020 at 20:42