RED-7001 add all pdftron fonts

This commit is contained in:
Dan Percic 2023-07-18 18:31:57 +03:00
parent f05146558c
commit 55aa2f8937
106 changed files with 488 additions and 65 deletions

View File

@ -25,7 +25,6 @@ import { UserPreferenceService } from '@users/user-preference.service';
import { Router } from '@angular/router';
import { WatermarksMapService } from '@services/entity-services/watermarks-map.service';
import { ROLES } from '@users/roles';
import { environment } from '@environments/environment';
export const DEFAULT_WATERMARK: Partial<IWatermark> = {
text: 'Watermark',
@ -52,6 +51,9 @@ interface WatermarkForm {
styleUrls: ['./watermark-screen.component.scss'],
})
export class WatermarkScreenComponent implements OnInit {
readonly #dossierTemplateId = getParam(DOSSIER_TEMPLATE_ID);
readonly #watermarkId = Number(getParam(WATERMARK_ID));
private _watermark: Partial<IWatermark> = {};
readonly iconButtonTypes = IconButtonTypes;
readonly currentUser = getCurrentUser<User>();
readonly form = this._getForm();
@ -64,9 +66,6 @@ export class WatermarkScreenComponent implements OnInit {
readonly orientationOptions = ['DIAGONAL', 'HORIZONTAL', 'VERTICAL'];
@ViewChild('viewer', { static: true }) viewer: ElementRef<HTMLDivElement>;
instance: WebViewerInstance;
readonly #dossierTemplateId = getParam(DOSSIER_TEMPLATE_ID);
readonly #watermarkId = Number(getParam(WATERMARK_ID));
private _watermark: Partial<IWatermark> = {};
constructor(
private readonly _http: HttpClient,
@ -175,9 +174,7 @@ export class WatermarkScreenComponent implements OnInit {
await this._drawWatermark();
});
if (environment.production) {
this.instance.Core.setCustomFontURL('https://' + window.location.host + this._convertPath('/assets/pdftron'));
}
this.instance.Core.setCustomFontURL(window.location.origin + this._convertPath('/assets/pdftron/fonts'));
this._disableElements();

View File

@ -13,7 +13,6 @@ import { asList } from '../utils/functions';
import { TranslateService } from '@ngx-translate/core';
import { LicenseService } from '@services/license.service';
import { UserPreferenceService } from '@users/user-preference.service';
import { environment } from '@environments/environment';
import TextTool = Core.Tools.TextTool;
import Annotation = Core.Annotations.Annotation;
import TextHighlightAnnotation = Core.Annotations.TextHighlightAnnotation;
@ -22,20 +21,6 @@ import Quad = Core.Math.Quad;
@Injectable()
export class PdfViewer {
readonly currentPage$ = this._activatedRoute.queryParamMap.pipe(
map(params => Number(params.get('page') ?? '1')),
shareDistinctLast(),
);
documentViewer: DocumentViewer;
fileId: string;
dossierId: string;
pageChanged$: Observable<number>;
compareMode$: Observable<boolean>;
totalPages$: Observable<number>;
#instance: WebViewerInstance;
readonly #compareMode$ = new BehaviorSubject(false);
readonly #searchButton: IHeaderElement = {
@ -47,6 +32,16 @@ export class PdfViewer {
setTimeout(() => this.#searchForSelectedText(), 250);
},
};
readonly currentPage$ = this._activatedRoute.queryParamMap.pipe(
map(params => Number(params.get('page') ?? '1')),
shareDistinctLast(),
);
documentViewer: DocumentViewer;
fileId: string;
dossierId: string;
pageChanged$: Observable<number>;
compareMode$: Observable<boolean>;
totalPages$: Observable<number>;
constructor(
private readonly _logger: NGXLogger,
@ -150,9 +145,7 @@ export class PdfViewer {
async init(htmlElement: HTMLElement) {
this.#instance = await this.#getInstance(htmlElement);
if (environment.production) {
this.#instance.Core.setCustomFontURL('https://' + window.location.host + this._convertPath('/assets/pdftron'));
}
this.#instance.Core.setCustomFontURL(window.location.origin + this._convertPath('/assets/pdftron/fonts'));
try {
await this.PDFNet.initialize(this._licenseService.activeLicenseKey);

View File

@ -1,7 +1,7 @@
{
"ADMIN_CONTACT_NAME": null,
"ADMIN_CONTACT_URL": null,
"API_URL": "https://red-staging.iqser.cloud/redaction-gateway-v1",
"API_URL": "https://dev-05.iqser.cloud/redaction-gateway-v1",
"APP_NAME": "RedactManager",
"AUTO_READ_TIME": 3,
"BACKEND_APP_VERSION": "4.4.40",
@ -11,7 +11,7 @@
"MAX_RETRIES_ON_SERVER_ERROR": 3,
"OAUTH_CLIENT_ID": "redaction",
"OAUTH_IDP_HINT": null,
"OAUTH_URL": "https://red-staging.iqser.cloud/auth/realms/redaction",
"OAUTH_URL": "https://dev-05.iqser.cloud/auth/realms/redaction",
"RECENT_PERIOD_IN_HOURS": 24,
"SELECTION_MODE": "structural",
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview",

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More