I'm trying to make a PDF/A file, but I'm getting this error:
! LaTeX Error: Option clash for package hyperref.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
Any ideas?
General ⇒ hyperref package error
- Stefan Kottwitz
- Site Admin
- Posts: 10300
- Joined: Mon Mar 10, 2008 9:44 pm
Re: hyperref package error
Use \PassOptionsToPackage with the conflicting setting,
Stefan
Stefan
LaTeX.org admin
Re: hyperref package error
To the preamble? Like this?
\usepackage[pdfa]{hyperref}
\usepackage[a-1b,latxmp,mathxmp]{pdfx}[2019/02/27]
\usepackage{colorprofiles}
\hypersetup{%
unicode=true,
pdftoolbar=false,
pdfmenubar=false,
pdffitwindow=true,
pdfstartview={FitH},
pdfnewwindow=true,
colorlinks=true,
linkcolor=black,
citecolor=black,
filecolor=black,
urlcolor=blue
}
\PassOptionsToPackage <----- I figured this needs to go before the \documentclass
\usepackage[pdfa]{hyperref}
\usepackage[a-1b,latxmp,mathxmp]{pdfx}[2019/02/27]
\usepackage{colorprofiles}
\hypersetup{%
unicode=true,
pdftoolbar=false,
pdfmenubar=false,
pdffitwindow=true,
pdfstartview={FitH},
pdfnewwindow=true,
colorlinks=true,
linkcolor=black,
citecolor=black,
filecolor=black,
urlcolor=blue
}
\PassOptionsToPackage <----- I figured this needs to go before the \documentclass
Re: hyperref package error
I'm still getting some error, but it worked
Had to cmd it with pdflatex.

- Stefan Kottwitz
- Site Admin
- Posts: 10300
- Joined: Mon Mar 10, 2008 9:44 pm
Re: hyperref package error
That's right, but before that package would also be ok.marbocam wrote: Fri Jan 17, 2025 5:50 pm \PassOptionsToPackage <----- I figured this needs to go before the \documentclass
Stefan
LaTeX.org admin
Re: hyperref package error
Thank you, Stefan 
