ng-pdf-renderer ๐Ÿ“„

May 26, 2025 ยท View on GitHub

A modern, zero-configuration PDF viewer for Angular applications with intelligent auto-fit, text selection, and responsive design.

npm version License: MIT Angular

๐Ÿš€ Quick Start

npm install ng-pdf-renderer
import { Component } from '@angular/core';
import { PdfViewerComponent } from 'ng-pdf-renderer';

@Component({
  selector: 'app-pdf-demo',
  standalone: true,
  imports: [PdfViewerComponent],
  template: `<ng-pdf-viewer [src]=\"pdfUrl\"></ng-pdf-viewer>`
})
export class PdfDemoComponent {
  pdfUrl = '/assets/document.pdf';
}

โœจ Features

  • ๐Ÿš€ Zero Configuration - Works out of the box
  • ๐Ÿ“ฑ Auto-Fit & Responsive - Adapts to any container size
  • ๐Ÿ“ Text Selection - Copy text directly from PDFs
  • ๐Ÿ” Search, Print, Download - Built-in functionality
  • ๐ŸŽฏ Modern Angular - Standalone components, Angular 19+
  • ๐Ÿ› ๏ธ Auto PDF.js Setup - No manual configuration needed

๐Ÿ“š Documentation

For complete documentation, examples, and configuration options, see the full README.

๐Ÿ—๏ธ Development

This repository contains:

  • Library: ./projects/ng-pdf-renderer/ - The npm package source
  • Test App: ./projects/pdf-test-app/ - Development testing application

Build & Test

# Install dependencies
npm install

# Build the library
ng build ng-pdf-renderer

# Run test application
ng serve pdf-test-app

# Publish to npm
npm publish dist/ng-pdf-renderer

๐Ÿ“„ License

MIT ยฉ askinjohn