All-About-PDF’s PDFe files are PDF documents that have been protected with encryption and DRM to include features such an expiry date, geolocation lock (where a document can only be viewed in specific regions), IP address lock (the document can only be viewed by users connected to a specific network), remote kill-switch ability (the document author can remote render the document invalid) and more. In a nutshell, they allow the document author to specify when and where the PDF document is no longer valid.
These features are very valuable to authors of valuable intellectual property such as online course materials, engineering designs, architecture drawings etc. This allows the authors to share their copyrighted material while maintaining full access control to their intellectual property.
In order to maintain high security, the PDFe file specification is proprietary to All-About-PDF and can only be opened by our special document readers.
In this document, we are going to show how you can embed the web PDFe Reader right into your web site or web application.
Prerequisites
basic knowledge of HTML and JavaScript
PDFe files that are stored on a server that can be accessed by our web API
a valid API key that was provided to you when you joined the Developer Programme
Scenario #1: Open a PDFe File from a link to a new tab:
<p>Click <a href="http://app.allaboutpdf.com/reader/?apikey={your-api-key}&pdfefile=https://myserver.com/docs/Company Details 2020.pdfe" target="_blank">here</a> for the document</p>
Scenario #2: Embed the PDFe Reader in an iFrame
<html> <head></head> <script> function setHeight(){ var frame = document.getElementById("reader"); frame.height = (90/100) * window.innerHeight; } function openDocument(){ var frame = document.getElementById("reader") frame.style.visibility = "visible"; frame.src = "http://app.allaboutpdf.com/reader/?apikey={my-api-key}&pdfefile=https://myserver.com/docs/Company Details 2020.pdfe"; } function closeDocument(){ var frame = document.getElementById("reader"); frame.style.visibility = "hidden"; frame.src = ""; } </script> <body onLoad="setHeight()"> <button type="button" onclick="openDocument()">Open Document</button> <button type="button" onclick="closeDocument()">Close Document</button> <iframe id="reader" src="about:blank" width="100%" style="border:0;visibility: hidden;" scrolling="no" ></iframe> </body> </html>