Skip to content

PDF

Display PDF documents inline with optional captions.

Syntax

Captions are supported by adding a [caption] line immediately below the block.

[pdf](path/to/document.pdf)
[caption] User guide

Examples

[pdf](./assets/specification.pdf)
[caption] Complete API reference

[pdf](https://docs.example.com/api.pdf)
[caption] Complete API reference

Builder

from notionary.markdown import MarkdownBuilder

markdown = (MarkdownBuilder()
  .h2("Documentation")
  .pdf("./assets/manual.pdf", "Installation guide")
  .paragraph("Follow the steps in the PDF above.")
  .build())

Reference

Notion API Reference

For the official Notion API reference on pdf blocks, see https://developers.notion.com/reference/block#pdf