How to create a PDF viewer template
I have many PDF documents for my website.
Instead of creating a seprate html page for each of them, I wish to use one html page, and as a visitor clicks on any link, that specific pdf document name will be passed into the script to invoke a view
How can I do that? Below is my page sample
Thanks
<!DOCTYPE html>
<html>
<head>
<title>Adobe Document Services PDF Embed API Sample</title>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1"/>
</head>
<body style="margin: 0px">
<div id="adobe-dc-view"></div>
<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function()
{
var adobeDCView = new AdobeDC.View({clientId: "MY KEY", divId: "adobe-dc-view"});
adobeDCView.previewFile(
{
// content: {location: {url: "https://documentcloud.adobe.com/view-sdk-demo/PDFs/Bodea Brochure.pdf"}},
content: {location: {url: "https://squadron-125.org.il/mypdf/bugi.pdf"}},
// metaData: {fileName: "Bodea Brochure.pdf"}
metaData: {fileName: "bugi.pdf"}
});
});
</script>
</body>
</html>
