# How to Compare PDF Documents in JavaScript Using Syncfusion PDF Viewer

DevFeed: [How to Compare PDF Documents in JavaScript Using Syncfusion PDF Viewer](<https://devfeed.tech/articles/how-to-compare-pdf-documents-in-javascript-using-syncfusion-pdf-viewer-109219.md>)

Original publisher: [Read original article](<https://www.syncfusion.com/blogs/post/how-to-compare-pdf-documents-in-javascript-using-syncfusion-pdf-viewer>)

Author: Deepa Thiruppathy

Published: 2026-10-30T19:49:57.457718Z

Content type: tutorial

Language: en

Sources: [Syncfusion](<https://devfeed.tech/sources/syncfusion-blogs.md>)

Topics: [pdf](<https://devfeed.tech/topics/pdf.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Front end](<https://devfeed.tech/topics/frontend.md>), [UI/UX Design](<https://devfeed.tech/topics/ui-ux-design.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [built-in](<https://devfeed.tech/tags/built-in.md>), [changes](<https://devfeed.tech/tags/changes.md>), [compare](<https://devfeed.tech/tags/compare.md>), [compare-pdf-documents](<https://devfeed.tech/tags/compare-pdf-documents.md>), [compare-text-differences-in-pdf](<https://devfeed.tech/tags/compare-text-differences-in-pdf.md>), [comparison](<https://devfeed.tech/tags/comparison.md>), [component](<https://devfeed.tech/tags/component.md>), [custom](<https://devfeed.tech/tags/custom.md>), [document-processing](<https://devfeed.tech/tags/document-processing.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [javascript-pdf-comparison](<https://devfeed.tech/tags/javascript-pdf-comparison.md>), [javascript-web](<https://devfeed.tech/tags/javascript-web.md>), [pdf](<https://devfeed.tech/tags/pdf.md>), [pdf-document-comparison-in-javascript](<https://devfeed.tech/tags/pdf-document-comparison-in-javascript.md>), [pdf-version-comparison](<https://devfeed.tech/tags/pdf-version-comparison.md>), [pdf-viewer](<https://devfeed.tech/tags/pdf-viewer.md>), [review](<https://devfeed.tech/tags/review.md>), [side-by-side-pdf-comparison](<https://devfeed.tech/tags/side-by-side-pdf-comparison.md>), [syncfusion](<https://devfeed.tech/tags/syncfusion.md>), [syncfusion-pdf-viewer](<https://devfeed.tech/tags/syncfusion-pdf-viewer.md>), [text](<https://devfeed.tech/tags/text.md>), [web](<https://devfeed.tech/tags/web.md>)

## AI overview

Syncfusion JavaScript PDF Viewer provides two ways to compare PDF revisions by text: `PdfComparer` offers a ready-made side-by-side interface with a differences panel, while `semanticTextCompare()` returns structured results for custom interfaces and workflows. The built-in comparer supports configurable highlight colors and opacity, hiding the differences panel, and synchronized scrolling. A custom implementation uses two `PdfViewer` instances; the application must manage layout, loading, navigation, and controls. Results include differences associated with each document and a total text difference count. Semantic comparison does not capture every visual change, such as changes to layout or images, and annotation text may appear as added content.

## Source excerpt

Explore how to compare PDF documents in JavaScript using Syncfusion PDF Viewer. Identify text changes between document versions and build custom review experiences.