@hmcts/media-viewer 3.0.3-RC.5 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/print.service.mjs +1 -5
- package/esm2020/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.mjs +3 -3
- package/fesm2015/hmcts-media-viewer.mjs +2 -6
- package/fesm2015/hmcts-media-viewer.mjs.map +1 -1
- package/fesm2020/hmcts-media-viewer.mjs +2 -6
- package/fesm2020/hmcts-media-viewer.mjs.map +1 -1
- package/lib/print.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1560,7 +1560,7 @@ class PdfJsWrapper {
|
|
|
1560
1560
|
this.pdfViewer.setDocument(pdfDocument);
|
|
1561
1561
|
this.pdfViewer.linkService.setDocument(pdfDocument, null);
|
|
1562
1562
|
const outlineNode = await pdfDocument.getOutline();
|
|
1563
|
-
const outline = outlineNode.map(x => {
|
|
1563
|
+
const outline = outlineNode ? outlineNode.map(x => {
|
|
1564
1564
|
return {
|
|
1565
1565
|
bold: x.bold,
|
|
1566
1566
|
color: x.color,
|
|
@@ -1573,7 +1573,7 @@ class PdfJsWrapper {
|
|
|
1573
1573
|
unsafeUrl: x.unsafeUrl,
|
|
1574
1574
|
url: x.url
|
|
1575
1575
|
};
|
|
1576
|
-
});
|
|
1576
|
+
}) : null;
|
|
1577
1577
|
if (outline) {
|
|
1578
1578
|
await this.setOutlinePageNumbers(pdfDocument, outline);
|
|
1579
1579
|
}
|
|
@@ -1950,10 +1950,6 @@ class PrintService {
|
|
|
1950
1950
|
printWindow.focus();
|
|
1951
1951
|
setTimeout((printer) => {
|
|
1952
1952
|
printer.print();
|
|
1953
|
-
printer.onafterprint = () => {
|
|
1954
|
-
printer.close();
|
|
1955
|
-
window.close();
|
|
1956
|
-
};
|
|
1957
1953
|
}, 3000, printWindow);
|
|
1958
1954
|
}
|
|
1959
1955
|
printElementNatively(element, width, height) {
|