Stirling-Tools / Stirling-PDF

#1 Locally hosted web application that allows you to perform various operations on PDF files
https://stirlingpdf.com
MIT License
43.21k stars 3.49k forks source link

Feature Request: Improved PDF Compare #1290

Open pholcroft opened 4 months ago

pholcroft commented 4 months ago

I have a few ideas to improve PDF Compare.

  1. Allow export of the new PDF with the different text highlighted. image Example: https://www.ilovepdf.com/compare-pdf
  2. Add a hover tooltip to show the difference between the exported version and the alternative. Example: https://evermap.com/Tutorial_ABM_CreateTooltipsViaTextSearch.asp
  3. Allow the export of either the old, or new PDF.
  4. Allow ignoring minor differences by %.
  5. Add quick links to the next difference.
  6. Allow highlight colour selection. image
  7. Allow viewing of the PDF's side-by-side.

Although there are other PDF comparison tools, I find them lacking, there is an opportunity to create a better solution here. Ilovepdf is the best I've found, but there's no way to choose if you get the old or new version, or if there is, it doesn't always work. It also doesn't offer tooltips.

You could add these features gradually. I've put them in my order of preference. Even just the first one would be a huge help, 1 and 2 would beat the competition.

The use case I have for these is comparing new versions of PDF's when there is an update. e.g. user manuals/systems requirements/release notes. I like to share the highlighted differences, as I know otherwise nobody would bother to read them.

ShawnJohnston commented 3 months ago

Completed item number 6. Contributing guide says I'm supposed to comment here and wait for approval before I can PR.

Items 1 & 3: These items require the page's code to edit the input PDF files directly. At this time, comparePDFs() only extracts raw text from PDF files, so there's no output PDF file produced to be exported. I have not added any new PDF-LIB.js code for this. Item 7: I attempted to display PDF's onto the page using the embed, object, and iframe tags, but the project config is set to deny X-Frame-Options, so I was not able to do it. I'm not yet aware of the accepted way of doing this.

FireShot Capture 005 - Stirling PDF - Compare - localhost