Merge branch 'master' into VM/RED-6774
This commit is contained in:
commit
3ff33b5701
@ -182,6 +182,8 @@ export class FilePreviewScreenComponent
|
|||||||
effect(() => {
|
effect(() => {
|
||||||
if (this._viewModeService.viewMode()) {
|
if (this._viewModeService.viewMode()) {
|
||||||
this.updateViewMode().then();
|
this.updateViewMode().then();
|
||||||
|
this._logger.info('[PDF] Stamp pdf');
|
||||||
|
this._stampService.stampPDF().then();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -279,8 +281,6 @@ export class FilePreviewScreenComponent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._logger.info('[PDF] Stamp pdf');
|
|
||||||
await this._stampService.stampPDF();
|
|
||||||
this._logger.info('[PDF] Rebuild filters');
|
this._logger.info('[PDF] Rebuild filters');
|
||||||
this.#rebuildFilters();
|
this.#rebuildFilters();
|
||||||
this._logger.info('[PDF] Update done');
|
this._logger.info('[PDF] Update done');
|
||||||
|
|||||||
@ -32,6 +32,7 @@ export class StampService {
|
|||||||
const file = this._state.file();
|
const file = this._state.file();
|
||||||
const allPages = [...Array(file.numberOfPages).keys()].map(page => page + 1);
|
const allPages = [...Array(file.numberOfPages).keys()].map(page => page + 1);
|
||||||
|
|
||||||
|
await pdfDoc.lock();
|
||||||
try {
|
try {
|
||||||
await clearStamps(pdfDoc, this._pdf.PDFNet, allPages, this._licenseService.activeLicenseKey);
|
await clearStamps(pdfDoc, this._pdf.PDFNet, allPages, this._licenseService.activeLicenseKey);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -48,7 +49,8 @@ export class StampService {
|
|||||||
await this._stampExcludedPages(pdfDoc, file.excludedPages);
|
await this._stampExcludedPages(pdfDoc, file.excludedPages);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._documentViewer.refreshAndUpdateView();
|
this._documentViewer.refreshAndUpdateView(Array.from({ length: await pdfDoc.getPageCount() }, (_x, i) => i + 1));
|
||||||
|
await pdfDoc.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _stampExcludedPages(document: PDFNet.PDFDoc, excludedPages: number[]): Promise<void> {
|
private async _stampExcludedPages(document: PDFNet.PDFDoc, excludedPages: number[]): Promise<void> {
|
||||||
|
|||||||
@ -120,11 +120,10 @@ export class REDDocumentViewer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshAndUpdateView() {
|
refreshAndUpdateView(visiblePages: number[]) {
|
||||||
this.#document.refreshAll();
|
|
||||||
// do not adjust this page if is compare mode
|
|
||||||
const currentPage = this.#document.getCurrentPage();
|
const currentPage = this.#document.getCurrentPage();
|
||||||
this.#document.updateView([currentPage], currentPage);
|
this.#document.refreshAll();
|
||||||
|
this.#document.updateView(visiblePages, currentPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
resetRotation(pages: number | number[] | string | string[]) {
|
resetRotation(pages: number | number[] | string | string[]) {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "redaction",
|
"name": "redaction",
|
||||||
"version": "4.129.0",
|
"version": "4.133.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user