# ComPDFKit

[ComPDFKit PDF SDK](https://www.compdf.com) seamlessly operates on [Web](https://www.compdf.com/web), [Windows](https://www.compdf.com/windows), [Android](https://www.compdf.com/android), [iOS](https://www.compdf.com/ios), [Mac](https://www.compdf.com/contact-sales), and [Server](https://www.compdf.com/server), with support for cross-platform frameworks such as [React Native](https://www.compdf.com/react-native), [Flutter](https://www.compdf.com/flutter), etc.

## Introduction
[ComPDFKit for Web](https://www.compdf.com/web) is a powerful JavaScript-based PDF Library that's part of the [ComPDFKit PDF SDK](https://www.compdf.com). It provides a slick out-of-the-box responsive UI that interacts with the core library to view, annotate and manipulate PDFs that can be embedded into any web project.

## Related

- Download [ComPDFKit for Web](https://www.npmjs.com/package/@compdfkit_pdf_sdk/webviewer) in npm.
- Go to [ComPDFKit's Web Demo](https://www.compdf.com/webviewer/demo) to experience how our WebViewer performs.
- Integrate ComPDFKit Web SDK into [Salesforce](https://www.compdf.com/pdf-sdk/salesforce), [SharePoint](https://www.compdf.com/pdf-sdk/sharepoint), [Microsoft Teams](https://www.compdf.com/contact-sales), etc. 

- [How to Build a PDF Viewer with JavaScript](https://www.compdf.com/blog/build-a-pdf-viewer-with-javascript)

- [ComPDFKit Standalone Deployment for Web](https://www.compdf.com/blog/compdfkit-standalone-deployment-for-web)

- Recognize and extract data from PDFs with our online [Extract Demo](https://www.compdf.com/pdf-extract/demo)

## Guides

You can get the full documentation of ComPDFKit for Web [here](https://www.compdf.com/guides/pdf-sdk/web/overview).

**1) Install WebViewer**

```
npm i @compdfkit_pdf_sdk/webviewer --save
```

This will [install the ComPDFKit for Web package](https://www.npmjs.com/package/@compdfkit_pdf_sdk/webviewer) and add it as a project dependency.

**2) Copy Assets to Your Static Folder**

These assets need to be served in your application. Copy the ComPDFKit for Web library's assets to the `static` directory in your project’s root folder.

The folder you need to copy is `node_modules/@compdfkit_pdf_sdk/webviewer/dist`.
```
cp -r ./node_modules/@compdfkit_pdf_sdk/webviewer/dist ./public/webviewer
```

**3) Import and Initial the WebViewer**

```js
import WebViewer from '@compdfkit_pdf_sdk/webviewer'

const element = document.getElementById('viewer');

WebViewer.init({
  path: '/', // the path of your webviewer
  pdfUrl: 'URL of your PDF File' // the path of your document
  license: 'Input your license here'
}, element).then((instance) => {
  // Call APIs here
})
```

**4) Apply the License Key**
Contact [ComPDFKit's sales team](https://www.compdf.com/contact-sales) to get a free 30-day license to test the project.

## Documentation
[Full documentation for ComPDFKit for Web](https://www.compdf.com/guides/pdf-sdk/web/overview) can be found here.

## License
ComPDFKit for Web supports flexible licensing options, please contact [our sales team](mailto:support@compdf.com) to know more. Each license is only valid for a root domain name and any of its subdomains. However, any documents, sample code, or source code distribution from the released package of ComPDFKit PDF SDK to any third party is prohibited.

## Support
ComPDFKit has a professional R&D team that produces comprehensive technical documentation and guides to help developers. Also, you can get an immediate response when reporting your problems to our support team.

- For detailed information, please visit our [Guides](https://www.compdf.com/guides/pdf-sdk/web/overview) page.

- Stay updated with the latest improvements through our [Changelog](https://www.compdf.com/pdf-sdk/changelog-web).

- For technical assistance, please reach out to our [Technical Support](https://www.compdf.com/support).

- To get more details and an accurate quote, please contact our [Sales Team](https://compdf.com/contact-us).

## Note
We are glad to announce that you can register a ComPDFKit API account for a [free trial](https://api.compdf.com/api/pricing) to process 1000 documents per month for free.
