A PDF viewer that seamlessly integrates with any JavaScript project
翻译准备中
正在加载完整 README。
查看完整 README ↗
EmbedPDF is a PDF viewer you add to any web app, in plain HTML, React, Vue, Svelte or Angular. People read, annotate, fill in, sign and redact PDFs right in the browser, on a PDF engine built on PDFium that runs as WebAssembly. Apache-2.0 licensed.
In plain HTML, from a CDN:
<embedpdf-viewer src="https://www.embedpdf.com/pdfs/welcome.pdf" style="height: 100vh"></embedpdf-viewer>
<script
type="module"
src="https://cdn.jsdelivr.net/npm/@embedpdf/viewer@3/dist/embedpdf.js"
></script>
In React:
npm install @embedpdf/viewer-react
import { PDFViewer } from '@embedpdf/viewer-react';
export function App() {
return <PDFViewer src="https://www.embedpdf.com/pdfs/welcome.pdf" style={{ height: '100vh' }} />;
}
Vue, Svelte and Angular work the same way, with @embedpdf/viewer-vue, @embedpdf/viewer-svelte
and @embedpdf/viewer-angular. The Quick start
then shows how to use your colors, leave features out and add your own buttons.
Every feature is on from the start, and each one can be turned off:
Each feature is a plugin. The headless packages let you take only the ones you need.
EmbedPDF is made by CloudPDF. Both are the same viewer, added to your app as a package. What differs is the engine behind it:
CloudPDF runs hosted, or on your own servers with its Docker image or Helm chart. See the CloudPDF docs.
We are grateful for the support of our sponsors!
We love contributions! To get started, read our contributing guide and jump into the GitHub discussions.
EmbedPDF is completely open source, under the Apache License 2.0: the viewer, the
engine and every plugin, every @embedpdf/* package. Use it, change it and ship it in any app,
commercial or not. (The handwriting fonts in @embedpdf/default-signature-fonts keep their own
open license, the SIL Open Font License.)
Everything you build with CloudPDF is open source under the Apache License 2.0 too: the viewer
(@cloudpdf/viewer and its framework packages), the engine (@cloudpdf/engine) and the SDK
(@cloudpdf/sdk).
The one exception is the server itself, cloudpdf/server. It is the product
CloudPDF sells, so it is Fair Source, under the
Fair Core License (FCL-1.0-ALv2):
LICENSING.md has the full map, including the websites' content and trademarks.
The engine is powered by EmbedPDF Runtime, our fork of PDFium, which is licensed under the Apache License, Version 2.0. PDFium is a Google project; EmbedPDF is not affiliated with or endorsed by Google.