Let’s say I have a PDF document which contains 5 pages. If I open my document directly using the “initialDoc” flag, it works fine, the displaying shows Page 1 and Page 2 next to each other, then 3 and 4, then 5. But if instead I try to compare two PDF files :
await PDFNet.initialize(); const newDoc = await PDFNet.PDFDoc.create(); await newDoc.lock(); const doc1 = await PDFNet.PDFDoc.createFromURL(url1); const doc2 = await PDFNet.PDFDoc.createFromURL(url2); await newDoc.appendTextDiffDoc(doc1, doc2); await newDoc.unlock(); instance.UI.loadDocument(newDoc);
The displaying changes, pages are displayed one under the other.
Any idea on how to fix that ? Thank you!