Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ng2-pdf-viewer

Package Overview
Dependencies
Maintainers
0
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-pdf-viewer

Angular 5+ component for rendering PDF

  • 10.3.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
160K
decreased by-3.1%
Maintainers
0
Weekly downloads
 
Created

What is ng2-pdf-viewer?

ng2-pdf-viewer is an Angular component for viewing PDF files. It provides a simple way to display PDF documents in your Angular applications with various customization options.

What are ng2-pdf-viewer's main functionalities?

Basic PDF Viewing

This feature allows you to display a PDF file in your Angular application. The 'src' attribute specifies the path to the PDF file, and 'render-text' enables text rendering.

<pdf-viewer [src]="'path/to/pdf-file.pdf'" [render-text]="true"></pdf-viewer>

Pagination

This feature allows you to navigate through the pages of a PDF document. The 'page' attribute specifies the current page, and you can use buttons to change the page.

<pdf-viewer [src]="'path/to/pdf-file.pdf'" [page]="page"></pdf-viewer>
<button (click)="page = page - 1">Previous</button>
<button (click)="page = page + 1">Next</button>

Zoom

This feature allows you to zoom in and out of the PDF document. The 'zoom' attribute specifies the zoom level, and you can use buttons to adjust the zoom level.

<pdf-viewer [src]="'path/to/pdf-file.pdf'" [zoom]="zoom"></pdf-viewer>
<button (click)="zoom = zoom + 0.1">Zoom In</button>
<button (click)="zoom = zoom - 0.1">Zoom Out</button>

Rotation

This feature allows you to rotate the PDF document. The 'rotation' attribute specifies the rotation angle, and you can use a button to rotate the document by 90 degrees.

<pdf-viewer [src]="'path/to/pdf-file.pdf'" [rotation]="rotation"></pdf-viewer>
<button (click)="rotation = rotation + 90">Rotate</button>

Text Layer

This feature enables the text layer, which makes the text in the PDF selectable and searchable. The 'render-text' attribute is set to true to enable this feature.

<pdf-viewer [src]="'path/to/pdf-file.pdf'" [render-text]="true"></pdf-viewer>

Other packages similar to ng2-pdf-viewer

Keywords

FAQs

Package last updated on 31 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc