We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

GroupDocs Comparison AppCompanent OnInit Metod


In Comparison application, when we open the document tree with the button in picture 2 and select the document, when I examine the Network in Developer mode, it triggers the LoadDocumentDescription endpoint and triggers the selectfile from the interface methods while performing the pagination process. As in picture 1.

I want to make that document open instead of selection by sending a path in the url I want to do. For this, I do it myself because Oninit is not implemented in the ComparisonAppComponent in the interface. As in picture 3. Then I call the selectfile method in the OnInit method and pass the path here. As in picture 4. When I check the code from the browser, the LoadDocumentDescription method is called and performs the pagination. As in picture 6. However, it cannot fetch data: image/png as in Picture 2. Unable to trigger ComparisonAppCompanent because it fails to fetch.

When I made this development for Annotation it worked fine. However, OnInit was implemented in AnnotationAppCompanent, I did not. As in Picture 5 Could it be caused by this? How should I proceed?
Picture 1.png (77.4 KB)
Picture 2.png (116.8 KB)
Picture 3.png (50.2 KB)
Picture 4.png (34.4 KB)
Picture 5.png (40.3 KB)
Picture 6.png (74.7 KB)


We are investigating this scenario. Your investigation ticket ID is COMPARISONNET-3079. We’ll notify you in case of any update.


Were you able to examine the issue? Any progress?


Please note that all the free support tickets are assisted on first come first serve basis. You’ll be notified as there’s any progress update.

Hello there,
Do you have an average response time? My registration for ANNOTATIONNET-2013 numbers has been waiting for 16 days, no response. If he’s going to wait that long on this record, it means it’s going to be a big problem for us. We bought this plugin by paying a fee, but we can’t use it now. We are a software company, we implement your software in our own software and use the document display parts in this way and present them to customers. Customers are waiting for a return from us. You need to consider the urgency situation.


Sorry for the inconvenience. COMPARISONNET-3079 is still under investigation. We’ll notify you in case of any progress update.

We expect a quick turnaround.


We’ll update you as there’s any ETA.

What does ETA mean? does that mean
Estimated time of arrival

1 Like



This scenario is under investigation and you’ll be notified as there’s any progress update or ETA of fix.


We are planning to implement this feature with the release of API version 22.6. As there’s any further information, we’ll notify you.

I’m asking because I didn’t have to wait for the package in vain.
When I get the guid from the url as in image1 and say super.ngoninit, will I be able to open it as if I had selected a document in the package. I want to make sure the question is fully understood.

Will you add oninit to the comparationcomponent as in image2?

In Annotation, I send the guidi on the url, then when I take it and call super.ngoninit, it does the remaining operations as if it had selected the document from the button and loaded it. Will comparation like this work?

image2.png (33.5 KB)
image1.png (20.3 KB)


We’re investigating it. You’ll be notified about the outcomes.


You can implement this feature using the code that you can find in this commit, see also the complete file listing for more details.

The following code selects two files and calls compare method.

  ngOnInit() {
    const queryString = window.location.search;
    if (queryString) {
      const urlParams = new URLSearchParams(queryString);

      const firstFile = urlParams.get(Files.FIRST);
      const secondFile = urlParams.get(Files.SECOND);
      if(firstFile && secondFile) {
        this.selectFile(firstFile, '', '', Files.FIRST);
        this.selectFile(secondFile, '', '', Files.SECOND);

The page with the comparison result is going to be displayed automatically.

Please let us know if it works as expected on your side.

this did not solve the problem. “Controller” returns the result, but the page remains as attached.

filePath: C:\a\b\c.docx
filePath2: C:\a\b\c2.docx

this.selectFile(this.filePath, ‘’, ‘’, this.filePath);
this.selectFile(this.filePath2, ‘’, ‘’, this.filePath2);

compare() {

if (this.credentials.size !== 2) {
this.resultTabDisabled = false;
const arr = [];
this.comparisonService.compare(arr).subscribe((result: CompareResult) => {
this.result = result;
const isZeroBasedPageId = this.result.changes.find((change) => change.pageInfo.pageNumber === 0);
this.result.changes.forEach( (change) => {
change.id = this.generateRandomInteger();
const zeroBasedId = isZeroBasedPageId ? change.pageInfo.pageNumber :
change.pageInfo.pageNumber - 1;
change.pageInfo.pageNumber = isZeroBasedPageId ? change.pageInfo.pageNumber :
change.pageInfo.pageNumber - 1;
this.result.pages[zeroBasedId].changes = [];
change.normalized = {
x : this.pxToPt(change.box.x) * 100 / change.pageInfo.width,
y : this.pxToPt(change.box.y) * 100 / change.pageInfo.height,
width: this.pxToPt(change.box.width) * 100 / change.pageInfo.width,
height: this.pxToPt(change.box.height) * 100 / change.pageInfo.height,
}, (err => {
this.resultTabDisabled = true;

The page looks like this.
image.png (16.9 KB)

image.png (29.4 KB)

image.png (60.5 KB)

my guid .docx

3d68478a-711d-4cd4-bc53-3eb4c4218dfa.docx (70.4 KB)

There is no place where I get an error. I can receive the changes as “docx”, but I cannot load them on the page.


As I can see from your code snippet you’re passing three parameters in selectFile method when four parameters are expected. Please also note that the fourth parameter values are constants, see

this.selectFile(this.filePath, '', '', Files.FIRST);
this.selectFile(this.filePath2, '', '', Files.SECOND);

Can you please update your code and double-check?

No there are four parameters.
FirsPameter= this.filePath
SecondParameter = ’ ’ (two single quotes)
ThirdParameter= ’ ’ (two single quotes)
FourthParameter = this.filePath
image.png (65.6 KB)

image.png (199.7 KB)


Right, please try using Files.FIRST and Files.SECOND as the fourth parameter value.

I made the fourth parameter “Files.FIRST” and “Files.SECOND”. It gave an error.

(edit: I fixed the fourth parameter. I got no error. The result has not changed.)