
























PDFs produced by CapyPDF exporter are not compatible with LuaLaTex
#### Summary: LuaTex cannot include PDFs produced with the CapyPDF exporter. It seems to be more than just the PDF-2.0 compatibility (which is not officially supported by LuaTex); when I convert the exported PDF to [QDF Mode](https://qpdf.readthedocs.io/en/stable/qdf.html) with qpdf, the resulting file *can* be included by LuaLaTex, albeit with a warning about the version mismatch. **Note:** This isn't really an Inkscape problem, more of a CapyPDF/LuaTex compatibility thing. All of the test documents produced as part of CapyPDF's test suite fail with the same issue, with the exception of the `pdfx3` test (which is PDF 1.3). I'm mostly just documenting it here because I think it's worth trying to make it compatible, particularly given how often people use Inkscape in conjunction with LaTeX. This problem is specific to the LuaTex build engine, including the version on Overleaf. It fails with the error message: ``` (pdf inclusion): reading image failed ``` I wanted to look at the PDF structure in more detail, so I converted it to a text-friendly format with `qpdf -qdf blank.pdf blankq.pdf`. Surprisingly, this version does work with LuaTex, though it does have a warning about the version: ``` PDF inclusion: found PDF version '2.0', but at most version '1.7' allowed ``` Building with `pdflatex` gives a similar warning message, but ultimately behaves: ``` pdfTeX warning: PDF inclusion: found PDF version <2.0>, but at most v ersion <1.7> allowed ``` #### Steps to reproduce: - Save a PDF from Inkscape 1.5 (any graphics, even a blank page) - Include it as a figure in a latex document, as in the following minimal example: ```tex \documentclass{article} \usepackage{graphicx} \begin{document} \includegraphics{blank.pdf} \end{document} ``` - Try to compile a PDF using LuaTex as the build engine (e.g. `lualatex sample.tex`) Sample attachments: - [blank.pdf](/uploads/98f7d1f153dcbb7b464a45434cd75cab/blank.pdf) - [blankq.pdf](/uploads/394e6f3a605c34beedf60953efac52d5/blankq.pdf)
issue
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。