https://github.com/jmgirard/embedpdf
A Quarto extension to embed PDF files in HTML formats
https://github.com/jmgirard/embedpdf
Last synced: 12 days ago
JSON representation
A Quarto extension to embed PDF files in HTML formats
- Host: GitHub
- URL: https://github.com/jmgirard/embedpdf
- Owner: jmgirard
- License: mit
- Created: 2023-04-13T23:17:16.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-13T21:49:06.000Z (3 months ago)
- Last Synced: 2025-03-27T17:48:34.871Z (19 days ago)
- Language: Lua
- Homepage:
- Size: 6.11 MB
- Stars: 60
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - jmgirard/embedpdf - A Quarto extension to embed PDF files in HTML formats (Lua)
README
> [!NOTE]
>
> Quarto has native PDF support that may be preferred in many cases: [native.html](https://jmgirard.github.io/embedpdf/native.html)# embedpdf Extension For Quarto
This extension provides support for embedding PDF files into Quarto HTML files (including RevealJS presentations). Each file will be added to your HTML file using the `` tag with a fallback to either text or (if supplied) an image with a download link for mobile browsers.
## Installing
You need to run the following command in your terminal while in the same working directory as your Quarto document. This is often easiest using an RStudio project and the RStudio terminal. Doing so will create a new `_extensions` folder in that directory.
```bash
quarto add jmgirard/embedpdf
```This will install the extension under the `_extensions` subdirectory.
If you're using version control, you will want to check in this directory.## Using
To embed a PDF file in your document, use the `{{< pdf URL >}}` shortcode. For example:
```
{{< pdf dummy.pdf >}}
{{< pdf dummy.pdf width=100% height=800 >}}
{{< pdf dummy.pdf image=dummy.png >}}
```## Guides
Here is a more in-depth guide to using the embedpdf extension: [example.html](https://jmgirard.github.io/embedpdf/example.html).