DZone

I’ve recently become acquainted with Adobe’s PDF Embed API. As you can probably guess by the name, it’s a library for embedded PDFs on a web page. Not just a simple viewer, it has APIs for interacting with the PDF as well really good mobile support. This is a part of the Document Cloud service which provides other PDF tools as well (extraction, conversion, and so forth). I’ve been playing with the viewer a bit and wanted to see what Vue.js integration would look like. Here’s my solution, but note that I’m still learning about the product so it could probably be done better.

First off, to use the API you need a key. Clicking the link from the webpage will walk you through the process of generating a key. One important note on this though. You have to lock down your key to a domain and that domain can not be changed either. Also, you can only specify one domain. So if you want your domain and localhost, create two projects, generate two keys, and set them as environment variables for your development and production environment. I did my testing on CodePen and had to use this domain: cdpn.io

Source: DZone