Not directly CF related, but I was wondering if th...
# adobe
c
Not directly CF related, but I was wondering if there is a way to use the Acrobat document comparison tool inside a website. We want to be able to upload some documents to the webserver and let subscribers pick two, maybe more, to compare the changes. I saw the API to use the viewer in a site and I saw the comparison tool, but not a way to use the tool in a site. Thanks for any help.
p
Not quite sure but there is this Java lib you could probably achieve a similar result: https://github.com/red6/pdfcompare
c
That does a pixel comparison. I was looking for a text comparison. But thank you.
m
Paging @raymondcamden
👍 1
p
This lib can extract text from PDFs and then you can handle comparisons: https://github.com/apache/pdfbox
c
@Patrick that could be an option. Given the size of my to-do list, I was hoping for a pre-packaged, and not necessarily free, solution.
p
There are endless 3rd party services out there you can toss stuff to and get results back. Just come at a cost.
c
Any you have tried and could recommend?
w
not saying a third party lib isn't useful, but fwiw you can extract pdf text with built in cfpdf functionality, so nothing external would be required for what you're describing
c
My goal was to not have to write the comparison code myself, but that remains an option.
w
what changes are you comparing, ANY changes or specific changes in specific blocks?
c
Any changes, to highlight anything moved, removed, reworded, whatever.
w
and your intention is to show those differences as a text diff or as pdfs highlighting the differences?
text = extracted text from the pdfs
c
The preference is pdf with highlighted changes, but pulling out text could work. My template was the Acrobat comparison tool, but that can't be embedded in a site.
w
didn't read all the way through it, but maybe have a look at the sdk underying this: https://webviewer-demo.foxit.com/overlay-comparison
didn't actually try that demo, but looks promising
looks like it treats them as images and produces an image with the differences
c
That does look promising. Thanks for the help. My searches hadn't found that one yet.
👍 1
r
our APIs dont cover comparison. in theory, you can use Extract, but its going to be a lot of work
❤️ 1
c
To follow up on this thread, Draftable did exactly what we needed. It wasn't cheap, but solved the problem.