- opt += "pdfborder={0 0 " ;
- opt += (pdfborder ?'0':'1');
- opt += "},";
-
- opt += "backref=" + convert<string>(backref) + ',';
- opt += "pagebackref=" + convert<string>(pagebackref) + ',';
- opt += "\n ";
- opt += "colorlinks=" + convert<string>(colorlinks) + ',';
- if (!pagemode.empty())
- opt += "pdfpagemode=" + pagemode + ',';
-
+ // only use the hyperref settings if hyperref is enabled by the user
+ // see bug #7052
+ if(use_hyperref) {
+ // try to extract author and title from document when none is
+ // explicitly given
+ if (pdfusetitle && title.empty() && author.empty())
+ opt += "pdfusetitle,";
+ opt += "\n ";
+ opt += "bookmarks=" + convert<string>(bookmarks) + ',';
+ if (bookmarks) {
+ opt += "bookmarksnumbered=" + convert<string>(bookmarksnumbered) + ',';
+ opt += "bookmarksopen=" + convert<string>(bookmarksopen) + ',';
+ if (bookmarksopen)
+ opt += "bookmarksopenlevel="
+ + convert<string>(bookmarksopenlevel) + ',';
+ }
+ opt += "\n ";
+ opt += "breaklinks=" + convert<string>(breaklinks) + ',';
+ opt += "pdfborder={0 0 ";
+ opt += (pdfborder ? '0' : '1');
+ opt += "},";
+ opt += "backref=" + backref + ',';
+ opt += "colorlinks=" + convert<string>(colorlinks) + ',';
+ if (!pagemode.empty())
+ opt += "pdfpagemode=" + pagemode + ',';