ng2-pdf-viewer + angular 13
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [X] Regression (a behavior that used to work and stopped working in a new release)
- [ ] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request
I’m unable to make a hello world app with angular 13 similar to this one. The application compile but the pdf don’t show. In the dom, the src field is incomplete:
Dependencies
"dependencies": {
"@angular/animations": "~13.1.0",
"@angular/common": "~13.1.0",
"@angular/compiler": "~13.1.0",
"@angular/core": "~13.1.0",
"@angular/forms": "~13.1.0",
"@angular/platform-browser": "~13.1.0",
"@angular/platform-browser-dynamic": "~13.1.0",
"@angular/router": "~13.1.0",
"ng2-pdf-viewer": "^7.0.2",
"rxjs": "~7.4.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
}
App.ts
import { Component } from '@angular/core';
@Component({
selector: 'example-app',
template: `
<pdf-viewer [src]="pdfSrc"
[render-text]="true"
[original-size]="false"
style="style="width: 400px; height: 500px"
></pdf-viewer>
`
})
export class AppComponent {
pdfSrc = "https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf";
}
App.module.ts
import { PdfViewerModule } from 'ng2-pdf-viewer';
@NgModule({
imports: [BrowserModule, PdfViewerModule],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (3 by maintainers)
Top Results From Across the Web
ng2-pdf-viewer - npm
Angular 5+ component for rendering PDF. Latest version: 9.1.3, ... Start using ng2-pdf-viewer in your project by running `npm i ng2-pdf-viewer`.
Read more >How to Build an Angular PDF Viewer with ng2-pdf-viewer
In this blog post, we'll provide step-by-step instructions on how to build a PDF viewer using the ng2-pdf-viewer package. In our example, we'll...
Read more >Create PDF Viewer in Angular 14 with NG2 PDF Viewer
The ng2-pdf-viewer is an excellent package exclusively built for creating PDF viewer components in angular applications.
Read more >ng2-pdf-viewer - StackBlitz
ng2 -pdf-viewer. A angular-cli project based on rxjs, tslib, webpack, zone.js, pdfjs-dist, @angular/core, worker-loader, @angular/forms, ng2-pdf-viewer, @angular ...
Read more >VadimDez/ng2-pdf-viewer: PDF Viewer Component for Angular
PDF Viewer Component for Angular. Contribute to VadimDez/ng2-pdf-viewer development by creating an account on GitHub.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
as a workaround for those facing the same issue, reverted back to last working version for me
^6.4.0
, seems to be working fine with angular 13.1.1This is still a problem with v9.0.0, reverting back to 6.4.0 fixed the issue with Angular 13.2.4.