User:Webwright/sandbox

WebPDF.pro is a set of commercial PDF web components in the form of custom HTML elements.

It can be used for embedding Portable Document Format (PDF) files and pages into HTML documents as self-contained, interactive and responsive custom elements.

The elements can be enabled with a single line on any web page: They do not have any dependencies and are compatible with all modern web browsers, including Chrome, Edge, Firefox, Safari as well as webviews for native applications.

 element
The following code fragment loads a PDF file into an HTML document.

Features

 * XML Forms Data Format (XFDF) support
 * single-line File System Access
 * f.open, f.save, f.XFDF.open, f.XFDF.save, …
 * open, edit and save a file without prompts on save
 * built-in proxy for cross-origin resource sharing (CORS)
 * load .pdf and .xfdf files from any web origin

 element
The following code fragment embeds an interactive PDF file page into an HTML document.

Features

 * interactive and responsive to context
 * no use of iframes of light DOM
 * annotation layer for links and forms
 * text layer for selection and search
 * image layer with 3 different renderers
 * PDF.js
 * canvas
 * SVG (Scalable Vector Graphics)
 * PDFium
 * canvas (high-fidelity)
 * layer export functions
 * p.image.export(ClipboardItem)
 * p.image.export(Blob) – PNG
 * p.image.export(Blob, { format: 'jpeg', quality: .2 }) – JPEG
 * p.image.export(Blob, { format: 'webp', quality: .2 }) – WebP
 * keyboard controls
 * e.g. Ctrl to copy page image to system clipboard

Form fill and save example
The elements are designed to minimize the code developers need to write. Unlike other commercial solutions, all processing takes place solely in the browser; the elements do not upload any files or input to a server.