Some test text!
Compare changes in semantic categories, such as headers, paragraphs, numbers, and generate a document with a summary of differences for easy review.
const wvElement = document.getElementById('viewer');
WebViewer({
fullAPI: true,
}, document.getElementById('viewer'))
.then(async instance => {
const { documentViewer, PDFNet } = instance.Core;
await PDFNet.initialize();
const newDoc = await PDFNet.PDFDoc.create();
await newDoc.lock();
const doc1 = await PDFNet.PDFDoc.createFromURL('./files/semantic_test_doc_1.pdf');
const doc2 = await PDFNet.PDFDoc.createFromURL('./files/semantic_test_doc_2.pdf');
await newDoc.appendTextDiffDoc(doc1, doc2);
await newDoc.unlock();
instance.UI.loadDocument(newDoc);
// wait until the document has been loaded
documentViewer.addEventListener('documentLoaded', () => {
instance.UI.setLayoutMode(instance.UI.LayoutMode.FacingContinuous);
});
});
Get the answers you need: Support
PDFTron SDK
COMPANY