Consider the following example using the package pdfx version 1.5.8, setting the PDF version as suggested in https://tex.stackexchange.com/a/202301/99345 for LuaTeX 0.95:

if pdf.getminorversion() \string~= 7 then
  if (status.pdf_gone and status.pdf_gone > 0)
  or (status.pdf_ptr and status.pdf_ptr > 0) then
    tex.error("PDF version cannot be changed anymore")



When building the PDF output with LuaTeX version 1.0.4, the following error occurs:

! error:  (pdf backend): minorversion cannot be changed after data is written to the PDF file
!  ==> Fatal error occurred, no output PDF file produced!

Omitting the package pdfx produces a PDF document with the correct version number 1.7 set. How can the desired PDF version number be set in combination with LuaTeX and pdfx?

  • 4
    As pdfx sets the minor version too, you can't set it before loading the package. pdfx has an option (pdf17) to set it, but due to a bug (hyperref options are not passed correctly) it has no effect. May 15, 2017 at 12:14
  • @UlrikeFischer: Is that bug known to the package developers? I could not find a bug tracker for pdfx.
    – sdm4n
    May 16, 2017 at 13:26
  • 2
    I didn't reported it, I didn't had the time yet (and also wanted to assemble a number of suggestion first). Write Ross a mail. It is mostly \expandafter's missing, e.g. like this \expandafter\hypersetup\expandafter{\pdfx@pdfAE@opts@xetex} May 16, 2017 at 14:14
  • 2
    Are there any news here?
    – TeXnician
    Oct 27, 2017 at 16:01
  • 1
    Well, when loading pdfx with one of the pdfa-options, then hyperref's own option pdfa is loaded which sets the pdf version back to 1.4: \kvsetkeys{Hyp}{pdfversion=1.4}
    – Martin
    Nov 13, 2017 at 20:42

1 Answer 1


There was a bug in hyperref versions prior to v6.86a with the pdfa option, which set the PDF always to version 1.4. The latest version of hyperref (>6.86a) fixes that problem.

  • Indeed, the problem is solved with current versions. Rephrase your answer or post a new one and I will accept it as a solution to the question.
    – sdm4n
    Jul 4, 2018 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.