red6 / pdfcompare

A simple Java library to compare two PDF files
Apache License 2.0
220 stars 66 forks source link

Choose PDF files dynamically instead of hardcode #44

Closed smohannaidu closed 5 years ago

smohannaidu commented 5 years ago

Hi,

This java library works for standalone pdf input files stored in my desktop. how to pass input pdf files at runtime. i.e dynamically end use has to select the files and call this library.

Also how do I change the java for my requirement.

In Detail explanation: I am trying to select the input PDF files from below jsp code and reading pdf file getParameter

Jsp home page code:

//browsing & selecting 1st pdf file //browsing & selecting 2nd pdf file // submit button getting pdf file as parameter String DocumentFile1 = request.getParameter("DocumentFile1"); String DocumentFile2 = request.getParameter("DocumentFile2"); passing to PdfComparator method: new PdfComparator(DocumentFile1, DocumentFile2).compare().writeTo(DocumentDiffResult); Can I write the result pdf file into local drive after submit, I am not able to get the result after submit If not, how can I get the result pdf file in the browser after user click submit or option to download pdf Regards Mohan
smohannaidu commented 5 years ago

Hi,

Can you please reply to my above query. waiting for your valuable feedback.

Regards Mohan

finsterwalder commented 5 years ago

The PdfCompare library is just a library. Using it in a Web-Application is not part of the library. I can't tell you, how to upload files and download a result. That has nothing to do with PdfCompare really. Please find other sources to fill your knowledge gaps.