[hyperref] Wrong driver `hpdftex.def'; pdfTeX is running in PDF mode. Forcing driver `hluatex.def'

Issue #22 resolved
Former user created an issue

Hi there,

When using pdfcomment in combination with lualatex, I see the following warning:

[hyperref] Wrong driver hpdftex.def'; pdfTeX is running in PDF mode. Forcing driverhluatex.def'

I can suppress this warning by changing pdfcomment.sty as follows:

--- pdfcomment.sty
+++ pdfcomment.sty
@@ -1352,10 +1352,10 @@
 \ifpdf%
   \@ifpackageloaded{hyperref}%
   {%
-    \hypersetup{pdftex}%
+    \hypersetup{luatex}%
   }%
   {%
-    \RequirePackage[pdftex,pdfencoding=auto]{hyperref}[2007/06/12]%
+    \RequirePackage[luatex,pdfencoding=auto]{hyperref}[2007/06/12]%
   }%
 \else%
   % to avoid problems with different default page size in

This patch is obviously not correct; it should likely make use of \ifluatex?

Comments (2)

  1. Josef Kleber repo owner

    Hi Anonymus,

    I can reproduce the "problem". Thanks for the report.

    I just want to add a note, that this is just a warning, not a severe error.

    Package hyperref Warning: Wrong driver `hpdftex.def';
    (hyperref)                pdfTeX is running in PDF mode.
    (hyperref)                Forcing driver `hluatex.def'.
    

    My code worked flawlessly in the past. I found something in hyperref's Changelog that might cause the warning in pdfcomment

    Fix driver check to allow luatex as well as pdftex in pdf mode

    I will upload a "bugfix" release to CTAN asap to avoid confusion.

    Josef

  2. Log in to comment