% This file is embedded in glossaries-extra-manual.pdf 
% Example 95 Chapter Title or PDF Bookmarks or Heading
% Label: "ex:titleorpdforheading"
% arara: pdflatex
% arara: pdflatex
\documentclass[12pt]{report}
\pagestyle{empty}
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\usepackage{hyperref}
\usepackage{glossaries-extra}
\pagestyle{headings} 
\begin{document}
\tableofcontents
\chapter{\glsxtrtitleorpdforheading{Title1}{PDF1}{Heading1} \glsxtrifinmark{in mark}{not in mark}}
\lipsum[1-5]
\chapter{\protect\glsxtrtitleorpdforheading{Title2}{PDF2}{Heading2}
\protect\glsxtrifinmark{in mark}{not in mark}}
\lipsum 
\end{document}
