[ACS-8096] Print button in the viewer does not open the print window (#9776) (#9778)

This commit is contained in:
jacekpluta
2024-06-06 21:49:36 +02:00
committed by VitoAlbano
parent 9315fe92e5
commit a31feeab78
2 changed files with 6 additions and 8 deletions

View File

@@ -257,17 +257,14 @@ export class RenditionService {
printFile(url: string, type: string): void {
const pwa = window.open(url, RenditionService.TARGET);
if (pwa) {
// Because of the way chrome focus and close image window vs. pdf preview window
if (type === RenditionService.ContentGroup.IMAGE) {
pwa.onfocus = () => {
pwa.onload = () => {
pwa.print();
if (type === RenditionService.ContentGroup.IMAGE) {
// Because of the way chrome focus and close image window vs. pdf preview window
setTimeout(() => {
pwa.close();
}, 500);
};
}
pwa.onload = () => {
pwa.print();
}
};
}
}

View File

@@ -37,6 +37,7 @@
#{$mat-form-field-infix}:has(.adf-share-link__input) {
border-top: 0.9375em solid transparent;
border-bottom: 0.9375em solid transparent;
height: 16px;
}