Library Spotlight

Spotlight: PDF.js for Document Viewing

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

M. WarbleDecember 3, 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.

Related Articles

Security

Security by Default: How Oorian Protects Your Applications

January 11, 2026
Announcement

Why We Built Oorian: The Story Behind the Framework

January 7, 2026
Tutorial

Getting Started with Oorian: Your First Java Web Application

December 31, 2025