1

I try to get an PDF/A document and followed different samples. When using pdfx to my understanding I cannot use any longer \hyperref package. Therefore I have problems to set the encoding. I have the following MWE

\PassOptionsToPackage{a-3b}{pdfx}
\PassOptionsToPackage{pdfa, pdfencoding=auto}{hyperref}
\RequirePackage{filecontents} %if filecontents should overwrite old files
\begin{filecontents}{\jobname.xmpdata}
    \Title{My Title möglich ÖÜß } % <--------------------- not encoded
    \Author{John Doe}
    \Source{my test} %<-------- not used
\end{filecontents}

\documentclass[12pt,a4paper,oneside,openright]{book} \usepackage{lipsum} \usepackage{pdfx} % \usepackage{hyperref} % comment out if using the 'pdfx' package

\hypersetup{% anchorcolor = black, unicode = true, }%

% ---------- packages to be loaded after hyperref ----------%

\usepackage{bookmark} % does not work with pdfx package in lualatex?

\begin{document} \tableofcontents \chapter{First} \section{First section} \lipsum[1-2] \section{Second section} \lipsum[1-10] \chapter{Second} \section{New section} \lipsum[1-5] \section{Newer section} \lipsum[1-8] \end{document}

According to the documentation 2.4 all UTF-8 chars are allowed. enter image description here

So my major problem is how to set the encoding properly?

LeO
  • 1,451
  • is your tex system up-to-date? – Ulrike Fischer Dec 01 '20 at 12:04
  • This works for me, and I have TeXlive 2017... – campa Dec 01 '20 at 12:30
  • Your document was saved as UTF-8 (good), but is being read as ISO 8859-1 aka Latin 1 (bad). At least one part of your toolchain seems not to be fully Unicode-aware. – Ingmar Dec 01 '20 at 12:56
  • Maybe it's just your viewer? Your document compiles just fine for me (LuaLaTeX). – Ingmar Dec 01 '20 at 13:02
  • If I set the same Text with hyperref I face the same Problem untlil I set pdfencoding=auto. So I have no clue why this approach has a different result. I'm working on a Linux and the system is more or less up2date. I think the packages are from March20 but I have serious problems to check in detail. – LeO Dec 01 '20 at 20:38
  • @Ingmar: Just a thought: might it be that the filecontents writes the wrong encoding under Linux? – LeO Dec 01 '20 at 20:40

0 Answers0