> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/appian/semantic-comparison/semantic-compare.md).

# Semantic Compare in Appian

Compare PDF files with ease using Apryse's WebViewer semantic comparison feature. Highlight text differences between documents effortlessly. Learn how to enable semantic compare and auto compare for e

## Overview

Apryse's WebViewer comes with semantic comparison available that enables comparing semantic differences between two PDF files. This feature is useful when you want to compare two versions of a document and highlight the differences between them. The comparison is done at the text level and highlights the differences in the text content between the two PDF files.

## Semantic Compare

To enable semantic compare, you can set [`enableSemanticCompareMode`](/appian/get-started/component-properties.md#enablesemanticcomparemode) to true. This will enable the mode to perform a comparison.

![](https://1373770520-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQBPkEFulYTrl1g37jENZ%2Fuploads%2Fgit-blob-61911353cb7b22de2e25df5422cd1be0aa8a2f4f%2Ff909190c95cbc7e7188b7522a10a8cdefc2d6c4a-1521x851.png?alt=media)

You can then load two PDF files into the WebViewer to compare them. You can provide two URLs to the [`url`](/appian/get-started/component-properties.md#url) or Appian document IDs to the [`appianDocId`](/appian/get-started/component-properties.md#appiandocid) property for it to load. Without providing two URLs or document IDs, WebViewer will wait for users to provide two documents to compare.

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
...
appianDocId: { 1626, 1423 },
...
```

{% endcode %}
{% endtab %}
{% endtabs %}

When two documents are loaded, the user can then press the `Start Comparison` button in the header to start the comparison. The comparison will highlight the differences between the two documents.

![](https://1373770520-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQBPkEFulYTrl1g37jENZ%2Fuploads%2Fgit-blob-14f3330e1c626d342ec60248d45614008c81ef90%2F15150196ec152e81dba732c630457f41f6be7119-1541x812.png?alt=media)

## Auto Compare

To automatically compare when two documents are loaded, you can set [`automaticSemanticCompare`](/appian/get-started/component-properties.md#automaticsemanticcompare) to true. This will automatically start the comparison when two documents are loaded.

## Sync Scrolling

When comparing two documents, you can enable sync scrolling by pressing the sync icon in the top right corner of either viewer. This will sync the scrolling of the two documents so that they scroll together.

![](https://1373770520-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQBPkEFulYTrl1g37jENZ%2Fuploads%2Fgit-blob-c14d16ab4e13aee521952af67eb3312389c19a8f%2Fa3722efcdb20bb5217eb9ebf41f79d981528de9f-121x87.png?alt=media)

## Additional documentation

For more details on how this works with code, see our [WebViewer semantic comparison docs](/web/compare-files/semantic.md) if you are looking to [do more with a config file](/appian/customization/working-with-apis.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/appian/semantic-comparison/semantic-compare.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
