A lightweight, customizable PDF viewing suite for modern web applications.
Add this script tag before closing the body tag.
<script src="https://siddharth.at/tools/pdf-viewer/api.js"><script>
Embeds a fully functional PDF viewer directly into your layout.
| Pattern | Req | Description |
|---|---|---|
src | Yes | Source PDF URL. |
name="{value}" | No | Brand Name. |
height="{val}" | No | e.g., height="70vh" |
margin="{val}" | No | e.g., margin="10px" |
border="{col thick}" | No | e.g., border="gray 2px" |
no-download | No | Hides download button. |
no-header | No | Removes brand header. |
no-controls | No | Removes zoom/nav bar. |
<sidpdf-viewer src="sample.pdf" name="Business" height="70vh" margin="8px" no-download no-controls no-header border="gray 2px"> </sidpdf-viewer>
Opens PDFs in the custom viewer via a new tab.
| Attribute | Req | Description |
|---|---|---|
url="{url} | Yes | The PDF link. |
name="{value}" | No | White Labeling. |
no-download | No | Disables download button. |
<sidpdf-ext url="sample.pdf" name="Business" no-download> Read Book </sidpdf-ext>
Having trouble? Use our SidPDF Widget Builder.