User:Webwright/sandbox
![]() | |
Developer(s) | PDF.ist |
---|---|
Initial release | 1 April 2021[1] |
Stable release | ♾️
/ 1 November 2021 |
Written in | JavaScript, CSS, HTML and C++ via WebAssembly |
Platform | Web |
Type | Web Components |
License | Software as a Service |
Website | webpdf |
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:
<script src="https://webpdf.co/<>" type=module></script>
They do not have any dependencies and are compatible with all modern web browsers, including Chrome, Edge, Firefox, Safari[2] as well as webviews for native applications.
<pdf-file>
element
[edit]The following code fragment loads a PDF file into an HTML document.
<pdf-file id=f src=https://pdf.ist/form.pdf></pdf-file>
Features
[edit]- XML Forms Data Format (XFDF) support[3]
- single-line File System Access[4]
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)[5]
- load .pdf and .xfdf files from any web origin
<pdf-page>
element
[edit]The following code fragment embeds an interactive PDF file page into an HTML document.
<pdf-page of=f controls></pdf-page>
Features
[edit]- interactive and responsive to context[6]
- 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[7]
- layer export functions[6]
- keyboard controls[6]
- e.g. Ctrl+C to copy page image to system clipboard
Form fill and save example
[edit]The elements are designed to minimize the code developers need to write.
<script src="//webpdf.co/<>" type=module></script>
<pdf-file id=f src=//pdf.ist/form.pdf></pdf-file>
<pdf-page of=f svg></pdf-page>
<button onclick=f.save()>Save</button>
Unlike other commercial solutions[8], all processing takes place solely in the browser; the elements do not upload any files or input to a server.[7]
See also
[edit]References
[edit]- ^ "WebPDF.pro announced".
- ^ "WebPDF.pro / Browser Support".
{{cite web}}
: CS1 maint: url-status (link) - ^ "Fill Forms with Ease and Privacy".
{{cite web}}
: CS1 maint: url-status (link) - ^ "<pdf-file> / Methods (IO)".
{{cite web}}
: CS1 maint: url-status (link) - ^ "WebPDF.pro / Docs".
{{cite web}}
: CS1 maint: url-status (link) - ^ a b c "WebPDF.pro / Docs".
{{cite web}}
: CS1 maint: url-status (link) - ^ a b c "High-fidelity Rendering".
{{cite web}}
: CS1 maint: url-status (link) - ^ "WebPDF.pro – Unlike any other".
{{cite web}}
: CS1 maint: url-status (link)
External links
[edit]Category:Cross-platform software Category:PDF software Category:Web applications Category:2021 software Category:Proprietary cross-platform software Category:Graphics software Category:Components