Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Is it possible to create a web-component of PDFjs

$
0
0

We're developing a file explorer with a PDF viewer in our MAUI-Blazor application. We need an open-source or free PDF viewer, as we're pre-revenue. Our requirements are:

  • Capability for importing and exporting annotations (does not need to be saved in the PDF)
  • Controlled via C# (or at least JavaScript)
  • Ability to render base64 encoded PDFs

We've considered using PDFjs, but its integration, primarily via an iFrame, is unsuitable. My attempt to build a Web Component using @open-wc and pdfjs-dist (follwing the example of using PDFjs in a canvas) was unsuccessful due to required NodeJS package dependencies (specifically "fs") that would error-out. But I cannot be sure that I did everything correctly.Additionally, this library partially met our needs but suffered from flickering issues on search and is also using an iFrame. In short: A web-component using @open-wc and pdfjs-dist without IFrame would be my personal favorite.Currently we are resigning to the fate of having to use PDFjs within an iFrame.

Options we have ruled out:

  • PDFjs Express: Requires payment for annotations.
  • PSPDFKIT: No free tier and undisclosed pricing.
  • Syncfusion: Paid and not up to our standards.

I'm seeking advice on this matter, as there must be others facing similar constraints in search of a robust PDF viewer.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>