Consider the folllowing example:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\newif\ifprint
%\printfalse
\printtrue
\makeatletter
\@ifpackageloaded{hyperref}{
\ifprint
\hypersetup{
pdfauthor={Søhest},
pdfsubject={Eksamenssæt}
}
\else
\hypersetup{
pdfauthor={Søhest},
pdfsubject={Eksamenssæt}
}
\fi
}{}
\makeatother
\begin{document}
Test
\end{document}
Note: Of course the code in the example is rather pointless since there is no difference between \printfalse
and \printtrue
but I have stripped the code as much a possible (I think).
I compile using latex
–> dvips
–> ps2pdf
and get the following error:
GPL Ghostscript 9.07: ERROR -15 closing pdfwrite device. See gs/psi/ierrors.h for code explanation.
I can't figure out how to fix this problem (and a search hasn't given me anything useful).
P.S. I upgraded my system from Fedora 18 to 19 yesterday and the problem started occuring thereafter.
Best Answer
A friend of mine found a very simpel solution: Simply use
instead of
and everything is fine (at least for the documents I have tried so far).
Update
The error is now fixed but one gets the following message:
I have send a question to the Fedora team and asked what I shuold do about it. (I'll add their answer here if it is relevant.)
Update 2
Now,
ps2pdf
is working flawlessly on Fedora when upgrading to the newest version of Ghostscript.