TeX - LaTeX Asked by P.Natu on September 16, 2020
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}
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}
Correct answer by Ulrike Fischer on September 16, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP