![]() Linking within the Inner HTML of an element with a standard link will open the PDF page within your browser window: You can fill in the full URL of your PDF.js viewer.html as your Source URL and adjust the size of your HTML widget to the size you wish. In Hype, select Insert > HTML Widget, and switch the Element Inspector. Next, load the view.js URL and make sure it works. Once you update this line to read your filename, you can upload the entire pdfjs folder to your website. That line by default reads: var DEFAULT_URL = '' Update that file to be the name of your PDF file. You'll see that on line 28, the PDF file is referenced. To use your own PDF, place it in the same directory where this PDF is. It needs to be uploaded to a web server first. Make sure you get the 'prebuilt' version of the project.ĭue to security restrictions in browsers, this project will not load in local browsers. If you unzip the project, you'll see a file called 'viewer.html' which is the actual demo. ![]() First, download the latest version from here. To use this awesome project in your Tumult Hype document, you'll first need to configure it outside of Hype. Their PDF.js project renders multi-page PDFs on desktop or mobile browsers. Mozilla has taken the lead on creating a cross-browser method of displaying PDFs as a regular DOM element. Just like other image types, it will follow the resource optimization rules (retina images will be generated by default). Drag and drop your PDF file into Hype and it will be rendered as an image. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |