Questions tagged [ng2-pdfjs-viewer]

56 questions
1
vote
0 answers

Angular 8 Multi phrase search using ng2-pdf-viewer

I'm working on an angular8 application and displaying a PDF using ng2-pdf-viewer library. Currently, I'm able to search the PDF for a single phrase using the code below. searchQueryChanged(searchStr: string) { if(searchStr != null &&…
0
votes
0 answers

PDF file only displays on Samsung devices and not on iPhones when using ng2-pdf-viewer in an ionic with angular app

I am trying to preview a PDF file (using external URL) inside modal view component in an ionic with angular app, I am using ng2-pdf-viewer plugin. The PDF kdisplyed only on samsung device either after build ionic cordova to Android & IOS or using…
0
votes
1 answer

Angular - HTML Canvas turns black when I start drawing

I'm building an Angular app where I intend to let the user draw text fields over PDF pages. For this, I'm using ng2-pdf-viewer library and I have a PDF page component that will hold a PDF page, as well as its corresponding HTML canvas element. The…
Manuel Brás
  • 413
  • 7
  • 21
0
votes
0 answers

Using Angular with Yarn PNP, how to include assets since there is no node_modules anymore?

In the latest angular-cli (16.0.2), it defaults to using yarn and pnp. With Yarn PNP the node_modules are done, and the packages remain in their zipped form. This is great, but I am wondering how I might be able to include some assets into my…
jr.
  • 4,503
  • 7
  • 44
  • 62
0
votes
1 answer

Edit ng2-pdf-viewer scrollbar

I want to change the styling of the scrollbar in my ng2-pdf-viewer... After inspecting the element, the element with the scrollbar is has a class .ng2-pdf-viewer-container Here is my code... The css has no effect on the scrollbar. What am I…
pblake586
  • 11
  • 2
0
votes
0 answers

How to install offline ng2-pdfjs-viewer package under the Angular application

How can I install and use the ng2-pdfjs-viewer offline in angular, because I do not want to install it every time and how can I build for production with an offline package of it?
Meet
  • 328
  • 3
  • 15
0
votes
0 answers

Replace version of pdfjs-dist to version v2.10.377

I'm using the ng2-pdfjs-viewer v13.2.2 package in an Angular 10.2.4 project. I would like to replace in the assets/pdfjs folder, the pdfjs-dist version of 2.2.171 (project original), with version 2.10.377. The reason is because the most current…
0
votes
0 answers

Using the ng2-pdfjs-viewer, is it possible to print all pdfs?

say i have multiple pdfs that are coming from S3 with a signed URL, is it possible in angular to create a 'print all' button and print all pdfs on the page in one go instead of pressing print on each individual pdf? Or if it is possible to display…
bbrooks96
  • 23
  • 5
0
votes
1 answer

Signed url from S3 to display PDF in Angular using ng2-pdfjs-viewer

Succesfully receiving a signed URL from S3, and using the ng2-pdf-viewer the pdf is displaying, however using ng2-pdfjs-viewer with the extra features does not work as expected. with ng2-pdf-viewer the src attribute works as expected my issue is…
bbrooks96
  • 23
  • 5
0
votes
1 answer

cannot customize the icons using ng2-pdfjs-viewer

I am using ng2-pdfjs-viewer to display the pdf document. I use Angular version 12. I am able to customize its style in the viewer.css file under assets/pdfjs/web/viewer.css. The design library which i am using in my project is carbon design system.…
0
votes
1 answer

Angular - ng2-pdfjs-viewer not getting initialized when used within ngIf div

component.html There is an option to select file using input element of file type as shown below. The selected file should get displayed in the div having pdfViewer. By default this div is not displayed in DOM. This is defined using *ngIf='isCeFile'…
hemant
  • 377
  • 1
  • 2
  • 13
0
votes
2 answers

Angular ng2-pdfjs-viewer when used with ngIf breaks the html page

I have been using ng2-pdfjs-viewer in Angular components. However, I need the div element to occupy space in DOM only if a condition is met. So I used *ngIf for the div. However, when I use ngIf the page breaks. In console it does not show any error…
hemant
  • 377
  • 1
  • 2
  • 13
0
votes
0 answers

ng2-pdfjs-viewer onDocumentLoad not triggered

I need to run a method when the pdf document is loaded. But the onDocumentLoad callback is not getting triggered. I'm rendering the pdf in the same window.
0
votes
1 answer

ng2-pdf-viewer getOutline() returns undefined

demo of ng2-pdf-viewer To show the table of content I used getOutline() as mentioned in here this.pdf.getOutline().then((outline: any[]) => { this.dataSource.data = outline; }); It is working fine this pdf. But for a few pdf Outline…
0
votes
1 answer

ng2-pdfjs-viewer left sidebar behaviour

The left sidebar seems to be closed by default for few pdfs and opened for few others? Is the tool taking some kind of decision on how it should be? I had tried to close the sidebar always using the onDocumentLoad event, but the problem is, the side…
aneeshere
  • 509
  • 5
  • 16