Get started with pdfobject CDN
MIT licensed
`pdfobject` is a library for embedding PDF files into HTML webpages.
Tags:- pdfobject
Stable version
Copied!
How to start using pdfobject CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with pdfobject CDN - cdnhub.io</title>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/pdf.min.js"></script>
<script src="https://cdn.cdnhub.io/pdfobject/2.3.0/pdfobject.min.js"></script>
</head>
<body>
<button id="loadPdf">Load PDF</button>
<div id="pdfContainer"></div>
<script>
document.addEventListener('DOMContentLoaded', () => {
const loadPdfButton = document.getElementById('loadPdf');
const pdfContainer = document.getElementById('pdfContainer');
loadPdfButton.addEventListener('click', () => {
const url = 'path/to/your/pdf.pdf'; // Replace with the PDF file URL or local file path
PDFObject.embedApi(url, pdfContainer, { width: 600, height: 800 });
});
});
</script>
</body>
</html>
Copied!
Copied!