Currently using ng2-pdfjs-viewer in our ionic 5/angular 8 app with cordova (android app). All pdf files are downloaded into the device and then we use ng2-pdfjs-viewer to show the content. It works fine with small pdfs, but it does not work (no error messages) with files larger than 1.8 mb.
<ng2-pdfjs-viewer *ngIf="pdfSrc" [pdfSrc]="pdfSrc"></ng2-pdfjs-viewer>
this.readFile(this.file.dataDirectory, this.docName)
.then((data) => {
this.pdfSrc = data;
})
.catch((error) => {
console.log(error);
});
...
readFile(path, file) {
return this.file.readAsDataURL(path, file);
}