1

Please find following MWE. It include all packages I've used along with 2 included pages and 2 bookmarks. If I compile following code using lualatex its giving me bookmarks in final generated PDF file. But, when I am using xelatex its giving me issue.

In log file its saying :-

Package bookmark Warning: Missing parameter (bottom) for `FitV', (bookmark) using 0 on input line x.

Above warning message appears for each \bookmark[view={FitV},dest=bookmark_208.1,level=0]... statement below. Am I missing any view related parameter here which have to be added if using 'xelatex'?

I switched to xelatex because I am generating multiple documents with more than 40k pages for which lualatex capacity exceeded..somehow xelatex worked in this case.

\documentclass[10pt,a4paper,hidelinks,table]{memoir}%
\usepackage[T1]{fontenc}%
\usepackage[utf8]{inputenc}%
\usepackage{lmodern}%
\usepackage{textcomp}%
\usepackage{lastpage}%
%
\usepackage{pdfpages}%
\usepackage{fancyhdr}%
\usepackage{geometry}%
\geometry{a4paper,inner=12mm,outer=12mm,top=12.5mm,bottom=9mm,footskip=6mm}%
\pagestyle{fancy}%
\fancyhead{}%
\usepackage{hyperref}%
\hypersetup{pdfstartview={FitV}}%
\hypersetup{pdfremotestartview={FitV}}%
\hypersetup{pdfview={FitV}}%
\hypersetup{bookmarksopen=true}%
\hypersetup{bookmarksopenlevel=2}%
\usepackage[open,openlevel=2]{bookmark}%
\bookmarksetup{view=FitV}%
%
\begin{document}%
\normalsize%
\fancyhf{}%
\renewcommand{\headrulewidth}{0pt}%
\includepdf[pages=-,scale=.95,link=true,linkname=bookmark_208,linkfit=FitV,pagecommand={}]{/path/to/page/000001.pdf}%
\includepdf[pages=-,scale=.95,link=true,linkname=bookmark_209,linkfit=FitV,pagecommand={}]{/path/to/page/000002.pdf}%

\bookmark[view={FitV},dest=bookmark_208.1,level=0]{Cover Sheet}%
\bookmark[view={FitV},dest=bookmark_209.1,level=0]{Cover Sheet}%

\end{document}
3
  • Unrelated but you shouldn't use fontenc, inputenc, lmodern, textcomp with an unicode engine. I can't test the bookmark now, perhaps in a few hours. Sep 13, 2020 at 7:56
  • Sure, I'll wait for your reply. :)
    – P.Natu
    Sep 13, 2020 at 8:07
  • I've checked log using lualatex. That FitV warning is there too..but LuaLatex gives bookmarks in final pdf while xelatex dont
    – P.Natu
    Sep 13, 2020 at 12:05

1 Answer 1

2

As the warning say, the FitV option expect a parameter, but bookmark/hyperref will use zero if it is not provided. But this is unrelated to the missing booksmarks: you are issuing the \bookmark commands after the last page, but with xelatex there must be on a page that is actually created. So move them before the \includepdf:

\documentclass[10pt,a4paper,hidelinks,table]{memoir}%
\usepackage{pdfpages}
\usepackage[open,openlevel=2,atend]{bookmark}
\bookmarksetup{view=FitV 0}%
\hypersetup{pdfstartview={FitV 0}}%
\hypersetup{pdfremotestartview={FitV 0}}%
\hypersetup{pdfview={FitV 0}}%
\hypersetup{bookmarksopen=true}%
\hypersetup{bookmarksopenlevel=2}%
\begin{document}%
\bookmark[view={FitV 0},dest=bookmark_208.1,level=0]{Cover Sheet}
\includepdf[pages=-,scale=.95,link=true,linkname=bookmark_208,linkfit=FitV 0,pagecommand={}]{example-image-a}%
\end{document}
1
  • Yes..It worked like charm. Thank you very much :)
    – P.Natu
    Sep 13, 2020 at 16:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .