> For the complete documentation index, see [llms.txt](https://overleaf-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://overleaf-pro.ayaka.space/latex/zh-cn/tex-latex-ji-yuan/08-pdfinclusionerrorlevel.md).

# \pdfinclusionerrorlevel

`\pdfinclusionerrorlevel[=]` *整数*

此命令用于控制 TEX 引擎在包含一个 PDF 文件时的行为，该文件的版本高于由 [`\pdfminorversion`](/latex/zh-cn/tex-latex-ji-yuan/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 规范的图形内容。The `\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://overleaf-pro.ayaka.space/latex/zh-cn/tex-latex-ji-yuan/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.
