HyGear / diff-dwg

Simple Python script to compare two PDF drawings and highlight the differences.
MIT License
37 stars 10 forks source link

Feature request: support multi page diffing of PDF with multiple pages #5

Closed ankush closed 3 years ago

ankush commented 5 years ago

I can work on this and send a PR if you want to implement it.

HyGear commented 5 years ago

I tried doing a multi-page diff in the past but never got it to work correctly. If a new page is added to the document it will shift the remaining pages and the comparison will not work if you are doing a page to page comparison.

The only way I could think of to get around this without a huge CPU load was to compare text between PDF files. The idea was to compare the text and determine which pages match between the two PDF files then use the anaglyph algorithm to make the composite comparison image. Unfortunately I discovered that matching text between documents is also difficult so I just focused on making it work for single documents.

ankush commented 5 years ago

Perhaps we can add this feature only if both documents have same number of pages? I do find it useful and hence I am working on such feature. I'll let you know if I can figure it out.

ankush commented 5 years ago

I've added a dumb multipage diffing in my fork for now. If it's okay, I can send PR.

Check https://github.com/amenat/diff-dwg/pull/2