mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-05-23 00:41:54 +02:00
[docs] add embed=pdf shortcode doc
This commit is contained in:
parent
51b99eb6f2
commit
a48476f3a9
2 changed files with 28 additions and 0 deletions
|
@ -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.
|
||||
{{</ alert >}}
|
||||
|
||||
**Example 1:**
|
||||
|
||||
```md
|
||||
{{</* embed-pdf url="./path/to/your/file.pdf" */>}}
|
||||
```
|
||||
|
||||
**Example 2:**
|
||||
|
||||
```md
|
||||
{{</* embed-pdf url="./path/to/your/file.pdf" renderPageNum="2" */>}}
|
||||
```
|
||||
|
||||
{{< embed-pdf url="./pdf/pdf-sample.pdf" renderPageNum="2" >}}
|
||||
|
||||
|
|
BIN
exampleSite/content/docs/shortcodes/pdf/pdf-sample.pdf
Normal file
BIN
exampleSite/content/docs/shortcodes/pdf/pdf-sample.pdf
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue