> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/latex/zh-cn/tex-latex-yuan-yu/08-pdfinclusionerrorlevel.md).

# \pdfinclusionerrorlevel

`\pdfinclusionerrorlevel[=]` *整数*

此命令用于控制 TEX 引擎在包含一个 PDF 文件时的行为；如果该文件的版本比由 [`\pdfminorversion`](/latex/zh-cn/tex-latex-yuan-yu/09-pdfminorversion.md).

* “`[=]`”表示等号是可选的。

**使用示例**

* `\pdfinclusionerrorlevel=-1` （或任何 $$<0$$）：不提供任何诊断信息。
* `\pdfinclusionerrorlevel=0` （默认）：会使 TEX 引擎发出警告。
* `\pdfinclusionerrorlevel=1`：会使 TEX 引擎报错。

#### \pdfinclusionerrorlevel：背景信息

自 20 世纪 90 年代首次发布以来， [PDF 文件格式](https://en.wikipedia.org/wiki/PDF) 经历了多次修订和增强，并且会定期发布正式 PDF 规范的新版本。因此，任何 PDF 文件，包括由 TEX 引擎生成的文件，都会符合 PDF 规范的某个特定版本——例如 PDF 1.4、1.5 等。每个 PDF 文件都包含用于标识该文件所符合的 PDF 规范版本的数据——这样，任何希望“使用” PDF 文件的应用程序（例如导入、处理等）都能知道该文件中可能包含哪些 PDF 功能。

如果你的 TEX 文档导入了一幅 PDF 格式的图形，例如通过 `\includegraphics`，那么该图形文件可能符合一个比 TeX 引擎自身输出 PDF 文件所支持的版本更新（更晚）的 PDF 规范。显然，这可能会导致 TEX 引擎生成的 PDF 版本与某个导入图形所使用的 PDF 版本之间发生“冲突”。例如，TEX 引擎排版生成的文档可能符合 PDF 1.4 版，而导入的图形可能符合 PDF 1.5 版。若仅仅将该导入图形嵌入而不做进一步处理，那么显然，TEX 生成的 PDF 输出文件将不再符合 PDF 1.4，因为它现在包含基于 PDF 1.5 规范的图形内容。该 `\pdfinclusionerrorlevel` 命令有助于管理这一点。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ayakaleaf-pro.ayaka.space/latex/zh-cn/tex-latex-yuan-yu/08-pdfinclusionerrorlevel.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
