OpenOffice (or LibreOffice) can be run as a service that let's you stream documents to it and it can return other formats. PDF and Flash are definitely supported. I think it can also do HTML. It's not a full viewer -- just the HTML -- you would have to figure out how you want to display it on a page.

Answer from Lou Franco on Stack Overflow
๐ŸŒ
Viewerjs
viewerjs.org
ViewerJS Home
ViewerJS must be the easiest way to use presentations, spreadsheets, PDF's and other documents on your website or blog without any external dependencies. No tricks, no conversions, no unexpected downtime from external services, and no plugins required โ€“ it happens to work just fine in all major browsers today from the comfort of your own webserver. Free of cost, free as in open source (so you can tweak it yourself) and very easy to use.
๐ŸŒ
GitHub
github.com โ€บ webodf โ€บ ViewerJS
GitHub - webodf/ViewerJS: ViewerJS: Document Reader in JavaScript
ViewerJS combines a number of excellent open source tools that are built on HTML and javascript. ViewerJS was funded by NLnet foundation and developed by KO GmbH. The heavy lifting in ViewerJS is done by these awesome projects: WebODF is a JavaScript library created by KO GmbH. It was started by Jos van den Oever at KO and is now developed by a growing team including external collaborators. It makes it easy to add Open Document Format (ODF) support to your website and to your mobile or desktop applications.
Starred by 2K users
Forked by 418 users
Languages ย  JavaScript 50.7% | CSS 25.8% | HTML 12.6% | CMake 10.9% | JavaScript 50.7% | CSS 25.8% | HTML 12.6% | CMake 10.9%
Discussions

html - Open source and web based html5 document viewer - Stack Overflow
It's not a full viewer -- just the HTML -- you would have to figure out how you want to display it on a page. ... Sign up to request clarification or add additional context in comments. ... You could take a look at the DocumentCloud project which has a bunch of components including an HTML5 Open Source ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Anybody know of an in-browser viewer for DOCX files
Protip: Search on GitHub and filter by language. Have a look here and see if any of these will do the trick: https://github.com/search?l=JavaScript&q=docx&type=Repositories&utf8=%E2%9C%93 More on reddit.com
๐ŸŒ r/javascript
11
1
July 4, 2016
Open-Source PDF viewer and editor
Okular is the best I used so far. It's developed by KDE but recently they made a release for Microsoft, so go try it, it's free and open source. EDIT: I don't know why I made the comment as if it were posted in a Windows or non-opensource subreddit. More on reddit.com
๐ŸŒ r/opensource
174
179
October 7, 2019
Is it safe to open unknown PDF on Evince Document viewer? How to check if the PDF file has embedded any scripts?

Upload it to virustotal to scan it. Though it already looks fishy. (Cannot blindly take extension name at face value. As it can be easily disguised.)

More on reddit.com
๐ŸŒ r/linux4noobs
8
7
July 29, 2019
๐ŸŒ
Apache PDFBox
products.documentprocessing.com โ€บ viewer โ€บ javascript
Free JavaScript Document Viewer | PDF, DOCX, XLSX | Open Source Libraries
June 25, 2025 - Explore our Open Source JavaScript Viewer Libraries to seamlessly view PDF, DOC/DOCX, XLS/XLSX documents in native JavaScript apps. Enhance your web development with powerful, easy-to-integrate document viewer APIs.
๐ŸŒ
Nutrient
nutrient.io โ€บ blog โ€บ sdk โ€บ top doc viewers
Top 5 document viewers for developers - Nutrient
October 30, 2024 - Build a powerful JavaScript document viewer and editor ยท WebODF(opens in a new tab) is an open source JavaScript library for rendering Open Document Format (ODF) files, such as text documents, spreadsheets, and presentations.
๐ŸŒ
GitHub
github.com โ€บ idrsolutions โ€บ idrviewer
GitHub - idrsolutions/idrviewer: The IDRViewer is a pure HTML/JavaScript/CSS viewer designed to display PDF and Office documents in the browser. It works alongside BuildVu which converts PDF documents to HTML5 or SVG pages.
The IDRViewer is a pure HTML/JavaScript/CSS viewer designed to display PDF and Office documents in the browser. It works alongside BuildVu which converts PDF documents to HTML5 or SVG pages. - idrsolutions/idrviewer
Starred by 29 users
Forked by 8 users
Languages ย  HTML 48.0% | JavaScript 46.5% | CSS 5.5% | HTML 48.0% | JavaScript 46.5% | CSS 5.5%
๐ŸŒ
Apache PDFBox
products.documentprocessing.com โ€บ viewer โ€บ javascript โ€บ pdf.js
PDF.js | Advanced JavaScript PDF Viewer | Open Source
June 25, 2025 - PDF.js is an open source JavaScript and HTML5 based PDF viewer library developed by Mozilla that allows viewing PDF (Portable Document Format) documents in the browser.
Find elsewhere
๐ŸŒ
GitHub
github.com โ€บ Atalasoft โ€บ web-document-viewer
GitHub - Atalasoft/web-document-viewer: Atalasoft Web Document Viewer repository for redistribution of client-side JS packages ยท GitHub
Atalasoft Web Document Viewer repository for redistribution of client-side JS packages - Atalasoft/web-document-viewer
Starred by 16 users
Forked by 10 users
Languages ย  CSS
๐ŸŒ
GitHub
github.com โ€บ Dynamsoft โ€บ document-viewer-javascript
GitHub - Dynamsoft/document-viewer-javascript
Dynamsoft Document Viewer does not rely on any external third-party JavaScript library. All processing, such as rendering and editing, is securely performed within the browser.
Author ย  Dynamsoft
๐ŸŒ
Embedpdf
embedpdf.com
Open-Source JavaScript PDF Viewer โ€“ Fast, Customizable & Framework-Agnostic | EmbedPDF
EmbedPDF is a blazing-fast, MIT-licensed JavaScript PDF viewer that works with React, Vue, Svelte, and plain JS. Fully customizable, zero vendor lock-in, and perfect for modern web apps.
๐ŸŒ
GitHub
github.com โ€บ webodf โ€บ ViewerJS_release
GitHub - webodf/ViewerJS_release: ViewerJS: Document Reader in JavaScript (release repo, for package/dependency managers)
ViewerJS: Document Reader in JavaScript (release repo, for package/dependency managers) - webodf/ViewerJS_release
Starred by 9 users
Forked by 10 users
Languages ย  Java 97.3% | HTML 2.6% | Java 97.3% | HTML 2.6%
๐ŸŒ
Mozilla
mozilla.github.io โ€บ pdf.js
PDF.js - Home
A general-purpose, web standards-based platform for parsing and rendering PDFs.
๐ŸŒ
Nutrient
nutrient.io โ€บ web โ€บ viewer
JavaScript PDF viewer library | Nutrient
Explore Nutrient Web SDKโ€™s JavaScript PDF viewer library to render, annotate, edit, and customize documents and images in the browser.
๐ŸŒ
Simssa
diva.simssa.ca
Diva.js - A web-based document collection viewer
IIIF Document Image Viewer ยท Get Started View on GitHub ยท MS Bodley 264, f. 188v ยท Hover your mouse over the videos to see Diva.js in action. Your browser does not support the video tag. Diva.js features several ways of navigating document images, either quickly to get to the page you are interested in, or slowly to zoom in on the fine details. Your browser does not support the video tag. "Shift page" makes openings line up, providing a smoother reading experience.
๐ŸŒ
Syncfusion
syncfusion.com โ€บ blogs โ€บ javascript โ€บ top 5 free javascript pdf viewer libraries for developers in 2026
Top 5 Free JavaScript PDF Viewer Libraries for Developers in 2026 | Syncfusion Blogs
January 5, 2026 - For advanced features such as annotations, form filling, and cross-framework support, the Syncfusion JavaScript PDF Viewer stands out as an enterprise-grade solution. Each library has unique strengths, so review their documentation and select ...
๐ŸŒ
Accusoft
accusoft.com โ€บ home โ€บ blog posts โ€บ viewerjs alternative: viewerjs vs prizmdoc
ViewerJS Alternative: ViewerJS vs PrizmDoc | Accusoft
February 20, 2025 - Typically, developers have a few minimum requirements for a viewer: it must display PDFs and Microsoft Office documents, should embed easily into their front-end HTML/CSS/Javascript. Sometimes additional features are needed, such as additional file support, signature, annotation, or redaction. ViewerJS is an open source product powered by PDF.js, a viewer created by Mozilla for its Firefox browser.
๐ŸŒ
ComPDF
compdf.com โ€บ blog โ€บ build-javascript-pdf-viewer-with-open-source-pdfjs
Build a JavaScript PDF Viewer: PDF.js vs ComPDF Guide
February 6, 2026 - This guide is designed to walk you through using both PDF.js and ComPDF for Web to build a JavaScript PDF viewer, allowing users to view and interact with PDF documents directly in a web browser without the need for an external PDF reader.
๐ŸŒ
Webodf
webodf.org
WebODF
Also of note is improved compression in generated documents (which should be much, much smaller now) thanks to JSZip, a javascript library for creating, reading, and editing ZIP files. So go to the Download page and update your deployment of webodf.js or the Wodo.TextEditor. Or check the demos (general, features). ... The project WebODF has been awarded with the third price in the Open Source ...
๐ŸŒ
Js
officetohtml.js.org โ€บ pages โ€บ docs.html
OfficeJs | Docs
<!--PDF--> <link rel="stylesheet" href="./include/pdf/pdf.viewer.css"> <script src="./include/pdf/pdf.js"></script> <!--Docs--> <script src="./include/docx/jszip-utils.js"></script> <script src="./include/docx/mammoth.browser.min.js"></script> <!--PPTX--> <link rel="stylesheet" href="./include/PPTXjs/css/pptxjs.css"> <link rel="stylesheet" href="./include/PPTXjs/css/nv.d3.min.css"> <!-- optional if you want to use revealjs (v1.11.0) --> <link rel="stylesheet" href="./revealjs/reveal.css"> <script type="text/javascript" src="./include/PPTXjs/js/filereader.js"></script> <script type="text/javasc