An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

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).