diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index d005a16e..4e3538c5 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -611,3 +611,31 @@ consectetur adipiscing elit. "I'm gonna make him an offer he can't refuse." The Godfather (1972) "Toto, I've a feeling we're not in Kansas anymore." The Wizard of Oz (1939) {{< /typeit >}} + +## Embed Pdf + +`embed-pdf` shortcode allows you to embed a PDF file in a page, it is developed using the [PDF.js](https://github.com/mozilla/pdf.js) library. + +| Parameter | Description | +| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| `url` | [String] The pdf file path. | +| `renderPageNum` | [number] The pdf initialize page no when render `embed-pdf`. | + +{{< alert >}} +The multiple `embed-pdf` with same pdf url can not render in one page. +{{}} + +**Example 1:** + +```md +{{}} +``` + +**Example 2:** + +```md +{{}} +``` + +{{< embed-pdf url="./pdf/pdf-sample.pdf" renderPageNum="2" >}} + diff --git a/exampleSite/content/docs/shortcodes/pdf/pdf-sample.pdf b/exampleSite/content/docs/shortcodes/pdf/pdf-sample.pdf new file mode 100644 index 00000000..da4f4d5f Binary files /dev/null and b/exampleSite/content/docs/shortcodes/pdf/pdf-sample.pdf differ