[XeTeX] Sub-optimal diagnostic from XeTeX/xdvipdfmx when including non-existent page from PDF
Philip Taylor
P.Taylor at Rhul.Ac.Uk
Sat May 1 20:25:48 CEST 2021
Given the following input, XeTeX/xdvipdfmx reports :
This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2021/W32TeX) (preloaded format=xetex)
restricted \write18 enabled.
entering extended mode
(./Hoi-An vegan menu (combine pages, bg).tex [1]
xdvipdfmx:fatal: Image inclusion failed for "./Hoi-An vegan menu (separate pages).pdf".
No output PDF file written.
)
Error 1 (driver return code) generating output;
file Hoi-An vegan menu (combine pages, bg).pdf may not be valid.
SyncTeX written on Hoi-An vegan menu (combine pages, bg).synctex.gz.
Transcript written on Hoi-An vegan menu (combine pages, bg).log.
for source :
\def \source {"Hoi-An vegan menu (separate pages).pdf" }
\setbox 1 = \vbox {\XeTeXpdffile \source page 1 width \dimexpr \hsize / 4 - \tuckloss - 0,666 \rulewidth \relax}\relax
\setbox 2 = \vbox {\XeTeXpdffile \source page 2 width \dimexpr \hsize / 4 - 0,666 \rulewidth \relax}\relax
\setbox 3 = \vbox {\XeTeXpdffile \source page 3 width \dimexpr \hsize / 4 - 0,666 \rulewidth \relax}\relax
\setbox 4 = \vbox {\XeTeXpdffile \source page 4 width \dimexpr \hsize / 4 - \tuckloss \relax}\relax
If the final line of the immediately preceding is commented out, the document compiles with success. It is therefore clear that the problem lies not with "./Hoi-An vegan menu (separate pages).pdf" per se, but rather with the assumption that "./Hoi-An vegan menu (separate pages).pdf" contains four or more pages. It would therefore be very helpful if XeTeX/xdvipdfmx could report that the problem occurred when trying to access page 4, rather than merely stating that « Image inclusion failed for "./Hoi-An vegan menu (separate pages).pdf" ».
--
Philip Taylor
This email, its contents and any attachments are intended solely for the addressee and may contain confidential information. In certain circumstances, it may also be subject to legal privilege. Any unauthorised use, disclosure, or copying is not permitted. If you have received this email in error, please notify us and immediately and permanently delete it. Any views or opinions expressed in personal emails are solely those of the author and do not necessarily represent those of Royal Holloway, University of London. It is your responsibility to ensure that this email and any attachments are virus free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/xetex/attachments/20210501/18ba5a9b/attachment.html>
More information about the XeTeX
mailing list.