Jump to content

User:Webwright/sandbox

From Wikipedia, the free encyclopedia

WebPDF.pro
Developer(s)PDF.ist
Initial release1 April 2021; 4 years ago (2021-04-01)[1]
Stable release
♾️ / 1 November 2021; 3 years ago (2021-11-01)
Written inJavaScript, CSS, HTML and C++ via WebAssembly
PlatformWeb
TypeWeb Components
LicenseSoftware as a Service
Websitewebpdf.pro

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]

<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]
    • 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[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]
  1. ^ "WebPDF.pro announced".
  2. ^ "WebPDF.pro / Browser Support".{{cite web}}: CS1 maint: url-status (link)
  3. ^ "Fill Forms with Ease and Privacy".{{cite web}}: CS1 maint: url-status (link)
  4. ^ "<pdf-file> / Methods (IO)".{{cite web}}: CS1 maint: url-status (link)
  5. ^ "WebPDF.pro / Docs".{{cite web}}: CS1 maint: url-status (link)
  6. ^ a b c "WebPDF.pro / Docs".{{cite web}}: CS1 maint: url-status (link)
  7. ^ a b c "High-fidelity Rendering".{{cite web}}: CS1 maint: url-status (link)
  8. ^ "WebPDF.pro – Unlike any other".{{cite web}}: CS1 maint: url-status (link)
[edit]

Category:Cross-platform software Category:PDF software Category:Web applications Category:2021 software Category:Proprietary cross-platform software Category:Graphics software Category:Components