mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
#68 show the image centered
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
Reference in New Issue
Block a user