@openbook/cloudpdf-viewer
v1.0.0
Published
CloudPDF - React PDF Viewer ======== The official [CloudPDF](https://cloudpdf.io) SDK for React.
Downloads
102
Readme
CloudPDF - React PDF Viewer
The official CloudPDF SDK for React.
CloudPDF is a cloud service that offers a pre-rendered PDF viewer.
Why do I need that?
The most active open-source PDF viewer is PDF.JS. They offer a well developed PDF viewer which is rendered on the client side. However, we encountered several problems in implementing PDF.JS in our websites:
- Large PDF documents can take a long time to load (sometimes up to 30 seconds).
- The PDF is downloaded to the client, limiting the potential for security features.
- Although the PDF is rendered on the client, you still need to store it somewhere.
- A lot of development time is required to build the UI around the PDF viewer.
When you upload a PDF document to CloudPDF, this document is rendered and processed on the server. This significantly increases the speed for large documents. We build a beautiful UI around the viewer and take care of all PDF storage management so there is no need to set up a PDF file storage. Finally, we are working on implementing security features that will enable you to limit PDF access, for example by showing a limited number of pages when a user on your website is not logged in.
Installation
Installation using Yarn
yarn add @openbook/cloudpdf-viewer
Installation using NPM
npm install @openbook/cloudpdf-viewer --save
Usage
Import component
import CloudPdfViewer from '@openbook/cloudpdf-viewer';
Usage component
<CloudPdfViewer documentId="346467a6-fa61-43ad-b45a-d1fdc3da0007" width="100%" height="500px" />
License
Released under the MIT license.