Development of PDF Comparison API is completed


Hello every body just completed development on API

you can donwload code from this link : https://sourceforge.net/projects/pdfcomaprisionjini/files/

Before Using this API in eclipse Project Create Following Folders

1. Differences

2. JPGPDF1

3. JPGPDF2

4. pdf1Images

5. pdf2Images

Example Usage

pdfComparison cmp=new pdfComparison();

//Text Comparison if(cmp.textComparision(“PDF1 path”,”PDF2 path”))

{

System.out.print(“\n**PDF text is identical* “);

  }
  else 
  {
      System.out.print("\n********PDF text is  not identical******* ");

  }
//will extract all images used in pages content and then copy differnce in differences folder
    cmp.extract_ALL_Images_ThenCompare("PDF1 path","PDF2 path");
    cmp.PDF_Convert_To_Jpeg_Comparision("PDF1 path","PDF2 path");
//will compare every page text
cmp.textComparision(String file1,String file2)
 //will convert every page into JPEG and then compare difference is saved in Differences Folder in project 
  cmp.PDF_Convert_To_Jpeg_Comparision();
}
Advertisements

2 thoughts on “Development of PDF Comparison API is completed

  1. Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/pdfbox/util/PDFTextStripper
    at pdfcomparison.comparePDF.compareText(comparePDF.java:124)
    at pdfcomparison.pdfComparison.textComparision(pdfComparison.java:17)
    at pdfComparer.pdfcompare.main(pdfcompare.java:13)
    Caused by: java.lang.ClassNotFoundException: org.apache.pdfbox.util.PDFTextStripper
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    … 3 more

    I am getting this error on running your code. What will be the possible solution?

    And does your comparer highlights the difference in text, images, tables, etc???

    Like

    1. yes shanu if you call image comparison functions they will compare jpeg to jpeg which means every thing text, images, tables, etc is covered but if you only do text comparison then these things are not covered .

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s