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 - npm Package Versions

1
11

4.1.2

Diff

Changelog

Source

4.1.2

  • [#281] - Fix error on resize during loading of pdf
vadimdez
published 4.1.1 •

Changelog

Source

4.1.1

  • [#260] - Public PDFFindController
  • [#279] - make pdfFindController public
Features

pdfFindController is now public, that means you can now execute a search on the pdf.

In your component's ts file:

  • Add reference to pdf-viewer,
  • then when needed execute search()
@ViewChild(PdfViewerComponent) private pdfComponent: PdfViewerComponent;

search(stringToSearch: string) {
  this.pdfComponent.pdfFindController.executeCommand('find', {
    caseSensitive: false, findPrevious: undefined, highlightAll: true, phraseSearch: true, query: stringToSearch
  });
}
vadimdez
published 4.1.0 •

Changelog

Source

4.1.0

  • [#274] - Page two way data binding. Do not reset page to 1.
  • [#265] - adding after-render-complete emitter
  • [#81] - Add a rendered event in promise

Page rendered event is added, use (page-rendered)=callback($event)

vadimdez
published 4.0.0 •

Changelog

Source

4.0.0

  • [#268] - Feature/restructure
  • [#209] - Angular 5

Breaking change

Location of bundles is changed.

Therefor SYSTEMJS config is now updated to:

var map = {
  'ng2-pdf-viewer': 'node_modules/ng2-pdf-viewer/bundles',
  'pdfjs-dist': 'node_modules/pdfjs-dist',
};

and then add to packages

var packages = {
  'ng2-pdf-viewer': { defaultExtension: 'js' },
  'pdfjs-dist': { defaultExtension: 'js' },
};
vadimdez
published 3.0.8 •

Changelog

Source

3.0.8

  • [#63] - How to scroll to page?
  • [#233] - Bookmark option
Features

Now both pdfViewer and pdfLinkService are public.

You can now scroll to a page from code:

// define view child
@ViewChild(PdfViewerComponent) private pdfComponent: PdfViewerComponent;

// ...

scrollToPage(page: number) {
  this.pdfComponent.pdfViewer.scrollPageIntoView({
    pageNumber: page
  });
}
vadimdez
published 3.0.6 •

Changelog

Source

3.0.6

  • [#200] - PDFDocumentProxy, PDFProgressData are undefined for compiler

Now you can import types where you need them directly from 'ng2-pdf-viewer' package:

import { PDFDocumentProxy, PDFProgressData } from 'ng2-pdf-viewer';
vadimdez
published 3.0.5 •

Changelog

Source

3.0.5

  • [#238] - added @types/pdf as peer dependency
vadimdez
published 3.0.4 •

Changelog

Source

3.0.4

  • [#162] - Worker Source
  • [#232] - Don't overwrite PDFJS.workerSrc if already set
  • [#226] - Update Size scale Error
  • [#237] - Prevent throwing error: "PDFViewer._setScale: '0' is an unknown zoom value"
  • [#182] - Documentation: Load preview for local files
Set custom path for worker:

In your code update path to the worker to be /pdf.worker.js

(<any>window).PDFJS.workerSrc = '/pdf.worker.js';

This should be set before pdf-viewer component is rendered.

vadimdez
published 3.0.3 •

Changelog

Source

3.0.3

  • [#168] - Dependency to a prebuilt-version of pdf.js (pdfjs-dist)
  • [#195] - progressData.total is undefined
  • [#222] - [render-text]="false" is not working
vadimdez
published 3.0.2 •

Changelog

Source

3.0.2

  • [#173] - SSR support
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