WebViewer Version: 10.8
Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? No
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? Yes
Is your issue related to annotations? No
Please give a brief summary of your issue:
Compare documents by image, pixels in Angular?
Please describe your issue and provide steps to reproduce it:
Good day,
I need to partially reproduce the Sync Diff Viewer example from this online demo but written in Angular-Typescript. I did notice also the sample written here does not seem to match what is in the online demo (Compare PDF documents using Javascript | Apryse documentation)
Anyway, I am trying this on an empty angular project first but on initialization, I am already running into problems with the component finding the Core and PDFNet namespace:
import { Component, AfterViewInit, ElementRef, ViewChild } from "@angular/core";
import WebViewer, { Core, UI, WebViewerInstance } from "@pdftron/webviewer";
@Component({
selector: "app-three-panel-compare",
standalone: true,
templateUrl: "./three-panel-compare.component.html",
styleUrls: ["./three-panel-compare.component.css"],
})
export class ThreePanelCompareComponent implements AfterViewInit {
@ViewChild("basePanel", { static: true }) basePanel!: ElementRef;
@ViewChild("resultPanel", { static: true }) resultPanel!: ElementRef;
@ViewChild("overlayPanel", { static: true }) overlayPanel!: ElementRef;
private instances: any = {};
private viewers: any[] = [];
private scrollTimeout: any;
private originalScroller: any;
private isLoading = false;
private pdfWorkerTransportPromise: any;
private officeWorkerTransportPromise: any;
async ngAfterViewInit(): Promise<void> {
await Core.PDFNet.initialize();
Core.setWorkerPath("../lib/core");
Core.enableFullPDF();
...
In this snippet of my component class, .PDFNet, .setWorkerPath() and .enableFullPDF() will throw an object undefined error. Is there supposed to be a correct way to perform these initialization functions?
For reference, this is the package.json of the project:
Please provide a link to a minimal sample where the issue is reproducible:
N/A



