lietwin

lietwin / DocumentViewer / 0.2.0

README.md

Introduction

DocumentViewer allows you to embed a document PDF, image or MS Office documents and any supported documents by Google Docs online viewer.

Input:

  • the full public url of your document (required)

output:

  • an html iframe code to embed into your html

Example

  • Input: a link to the excellent guide on What is an API
https://www.3scale.net/wp-content/uploads/2012/06/What-is-an-API-1.0.pdf
  • Output: the corresponding iframe code to embed into your web application
<iframe class="google-docs-viewer iframe" src="https://docs.google.com/viewer?url=https://www.3scale.net/wp-content/uploads/2012/06/What-is-an-API-1.0.pdf&embedded=true"  frameborder="0"scrolling="no" marginheight="0" marginwidth="0" role="document" aria-label="document" title="an online document">Click to view the document</iframe>