Library Spotlight

Spotlight: PDF.js for Document Viewing

Display PDF documents in your Oorian applications with PDF.js.

M. WarbleJuly 16, 20261 min read
Spotlight: PDF.js for Document Viewing

PDF.js is Mozilla's PDF viewer. Oorian's wrapper enables in-browser PDF viewing without external plugins.

Basic Viewer

PdfViewer viewer = new PdfViewer();
viewer.setUrl("/documents/report.pdf");
viewer.setHeight("600px");
body.addElement(viewer);

Controls

viewer.setShowToolbar(true);
viewer.setEnableSearch(true);
viewer.setEnablePrint(true);
viewer.setInitialZoom(1.5);

Page Navigation

viewer.goToPage(5);
int currentPage = viewer.getCurrentPage();
int totalPages = viewer.getTotalPages();

Conclusion

PDF.js integration provides a consistent PDF viewing experience across all modern browsers.

Share this article

Related Articles

Library Spotlight

Spotlight: Chart.js for Beautiful Data Visualization

January 27, 2026
Deep Dive

Logging and Error Handling in Oorian: A Complete Guide

February 24, 2026
Architecture

Event Handling in Oorian

February 19, 2026