# problem with a variable in pdfinfo, probably something obvious

Wed Jun 17 20:32:10 CEST 2020

```Hello,

On 2020-06-17 16:05, Mike Marchywka wrote:
> X-bib-pages                     :  covid19.lastpage

> \newcommand{\mjmaddbib}[2]{\hypersetup{ pdfinfo={ x-bib-#1 = {#2}}}\mjmsummabib{#1}{#2}}

> %   PAGES =         \{6\},
>    PAGES =         \{ \input{\mjmbasename.last_page} \},

This is a job for package `catchfile`
(https://www.ctan.org/pkg/catchfile).
It provides commands to read the contents of a file
into a macro. Example:

\usepackage{catchfile}
\CatchFileEdef\mjmpages{\mjmbasename.last_page}{\endlinechar=-1\relax}