Skip to content

Commit

Permalink
[ACS-8096] Print button in the viewer does not open the print window (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jacekpluta authored and VitoAlbano committed Jul 1, 2024
1 parent 9ac2164 commit 751e125
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 751e125

Please sign in to comment.