Angular Pdfjs Viewer

screenshot of Angular Pdfjs Viewer
angular

PDF.js viewer directive for AngularJS

Overview

If you're looking to integrate a PDF viewer into your Angular application, the PDF.js viewer Angular directive is a noteworthy option. It brings the familiar PDF handling capabilities of Mozilla's PDF.js, allowing users to navigate through documents seamlessly while maintaining the classic look and feel of PDFs. Despite no longer being actively maintained, the implementation still offers a reliable tool for embedding full-featured PDF viewing capabilities into your projects.

The directive is designed for ease of use and flexibility, providing several options that cater to different user needs. Whether you're working with URLs or raw data, the PDF.js viewer directive makes it intuitive to display PDF files with essential functionalities effortlessly.

Features

  • Easy Integration: Quickly embed the PDF viewer in your Angular application with minimal setup, following simple implementation guidelines.
  • Multiple Browser Support: Compatible with major browsers including Chrome, Firefox, Safari, and Edge, ensuring cross-platform functionality.
  • Customizable Toolbar: The toolbar includes options for downloading, printing, and opening PDFs, which can be customized to show or hide buttons as needed.
  • Dynamic Scaling: The scale attribute allows you to obtain and maintain the current zoom level, enhancing user experience while viewing detailed documents.
  • Lifecycle Hooks: Leverage the on-init and on-page-load functions to execute code when the viewer loads, providing more control over the document loading process.
  • Flexible Sizing: The viewer automatically adjusts to the dimensions of its parent container, making it adaptable to various layouts.
  • Performance Considerations: Advanced users can configure the location of PDF.js assets and decide whether to use the Web Workers API to optimize performance based on their project needs.
  • Support for Raw Data: If a direct URL isn't available, pass raw PDF data as a Uint8Array object to display content seamlessly.
angular
Angular

Angular is a TypeScript-based open-source framework by Google for building dynamic single-page applications and cross-platform mobile apps with MVC architecture and a rich set of features.

grunt
Grunt

Grunt is a popular JavaScript task runner that automates repetitive tasks like minification, compilation, and testing, allowing developers to focus on writing code.