> 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-tw/tex-latex-ji-ben-ming-ling/08-pdfinclusionerrorlevel.md).

# \pdfinclusionerrorlevel

`\pdfinclusionerrorlevel[=]` *整數*

此命令用於控制 TEX 引擎在加入一個 PDF 檔案時的行為，當該 PDF 檔案的版本比由 [`\pdfminorversion`](/latex/zh-tw/tex-latex-ji-ben-ming-ling/09-pdfminorversion.md).

* “`[=]`” 表示等號是可選的。

**使用範例**

* `\pdfinclusionerrorlevel=-1` （或任何 $$<0$$）：不提供任何診斷資訊。
* `\pdfinclusionerrorlevel=0` （預設）：會使 TEX 引擎發出警告。
* `\pdfinclusionerrorlevel=1`：會使 TEX 引擎引發錯誤。

#### \pdfinclusionerrorlevel：背景資訊

自 1990 年代首次發表以來， [PDF 檔案格式](https://en.wikipedia.org/wiki/PDF) 已經歷多次修訂與改良，並週期性地導致新的正式 PDF 規格發布。因此，任何 PDF 檔案，包括由 TEX 引擎產生的檔案，都會符合某一特定版本的 PDF 規格——例如 PDF 1.4、1.5 等。每個 PDF 檔案都包含資料，用以識別該檔案符合的是哪一個版本的 PDF 規格——如此一來，任何希望「讀取」PDF 檔案（例如匯入、處理等）的應用程式，都知道該檔案中可能包含哪些 PDF 功能。

如果你的 TEX 文件匯入了一個 PDF 格式的圖形，例如透過 `\includegraphics`，那個圖形檔案所符合的 PDF 規格可能比 TeX 引擎自身輸出 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-tw/tex-latex-ji-ben-ming-ling/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.
