#68 show the image centered

This commit is contained in:
Eugenio Romano
2016-06-06 17:32:27 +01:00
parent 1c090338d2
commit 10754bb0b1
4 changed files with 76 additions and 77 deletions

View File

@@ -48,13 +48,15 @@ export class PdfViewerComponent {
}
if (this.urlFile) {
return new Promise((resolve) => {
return new Promise((resolve, reject) => {
this.getPDFJS().getDocument(this.urlFile, null, null).then((pdfDocument) => {
this.currentPdfDocument = pdfDocument;
this.totalPages = pdfDocument.numPages;
this.page = 1;
this.displayPage = 1;
this.initPDFViewer(this.currentPdfDocument);
}, (error) => {
reject(error);
});
resolve();
});