How can u get the matching percentage whenever compare the pdf files(compare the strings)

Actually I want matching percentage whenever compare the pdf files.First I had completed 
read the pdf files content into string
my code like as
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using iTextSharp.text;
using iTextSharp.text.pdf;
using iTextSharp.text.pdf.parser;
namespace WindowsFormsApplication1
public partial class Form1 : Form
string str1;
string filename;
string path;
string str2;
public Form1()
InitializeComponent();
private void button1_Click(object sender, EventArgs e)
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.CheckFileExists = true;
openFileDialog.AddExtension = true;
openFileDialog.Filter = "PDF files (*.pdf)|*.pdf";
DialogResult result = openFileDialog.ShowDialog();
if (result == DialogResult.OK)
filename = Path.GetFileName(openFileDialog.FileName);
path = Path.GetDirectoryName(openFileDialog.FileName);
textBox1.Text = path + "\\" + filename;
private void button2_Click(object sender, EventArgs e)
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.CheckFileExists = true;
openFileDialog.AddExtension = true;
openFileDialog.Filter = "PDF files (*.pdf)|*.pdf";
DialogResult result = openFileDialog.ShowDialog();
if (result == DialogResult.OK)
filename = Path.GetFileName(openFileDialog.FileName);
path = Path.GetDirectoryName(openFileDialog.FileName);
textBox2.Text = path + "\\" + filename;
public static string ExtractTextFromPdf(string filename)
using (PdfReader r = new PdfReader(filename))
StringBuilder text = new StringBuilder();
for (int i = 1; i <= r.NumberOfPages; i++)
text.Append(PdfTextExtractor.GetTextFromPage(r, i));
string result = text.ToString();
return result;
public static string Extract(string filename)
using (PdfReader r = new PdfReader(filename))
StringBuilder text = new StringBuilder();
for (int i = 1; i <= r.NumberOfPages; i++)
text.Append(PdfTextExtractor.GetTextFromPage(r, i));
string result1 = text.ToString();
return result1;
private void button3_Click(object sender, EventArgs e)
str1 = Form1.ExtractTextFromPdf(textBox1.Text);
str2 = Form1.Extract(textBox2.Text);
}Finally how can u get the matching percentage whenever compare the pdf files(compare the strings)please help me.thank u

Hi,
Based on your code, I see your code related to
iTextSharp Pdf.
iText is a third party library to create PDF originally written for java. iTextSharp is
the C# adaptation of that library.
Question regarding iText are better asked on the iText forum, rather than the Microsoft Forum:
http://itextpdf.com/support
Thanks for your understanding.
Best regards,
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Reminders list frequently disappear,how can i get back my list whenever it suddently disapear?:(

    reminders list frequently disappear,how can i get back my list whenever it suddently disapear?:(
    I rely deeply on my reminders list, but a few times, the list just disappear and I have to rewrite my lists, but it is getting more and more annoying because my list is getting longer and longer and i just can't write it over and over again. Does it have a connection to my icloud for reminders is being disabled?
    Please help me.
    Thank You

    Phone to Mac will be able to pull up your previous backup info from your computer so you can have a copy of Contacts, SMS, etc.
    http://www.macroplant.com/phonetomac/

  • How can I get a match text effect in a Choice

    How can I get a match text effect in a Choice; I mean, for instance, that if a type a "p" the first choice item that begins with a "p" should be automatically selected

    Here is a pretty simple example. Keep in mind that I am coverting all comparison characters to UpperCase. If you allow LowerCase characters in you Choice items then remove the appropriate Character.toUpperCase() calls.
    Hope this helps
    Mike
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TestApplet extends Applet implements KeyListener {
         private Choice choice;
         public void init()
              setLayout(new FlowLayout());
              choice = new Choice();
              choice.add("Aaron");
              choice.add("Adam");
              choice.add("David");
              choice.add("Mike");
              choice.addKeyListener(this);
              add(choice);
         public void keyPressed(KeyEvent e)
              int current = choice.getSelectedIndex();
              int x = 0;
              char c = Character.toUpperCase(e.getKeyChar());
              while(x<choice.getItemCount()) {
                   if(c == Character.toUpperCase(choice.getItem(x).charAt(0))) {
                        current = x;
                        break;
                   x++;
              choice.select(current);
         public void keyReleased(KeyEvent e) { }
         public void keyTyped(KeyEvent e) { }
    }

  • How can I get an album to play in order on Itunes?  The songs keep skipping all around to other albums that I did not want to listen to at that time?

    How can I get an album to play in order on Itunes?  The songs keep skipping all around to other albums that I did not want to listen to at that time?

    It sounds like you might have the shuffle button at the bottom left of the iTunes (the button with the squiggly lines).
    If that's not the case, then maybe you just need to sort your library by album by clicking the album tab at the top.
    Is your music in a playlist, or are you trying to play it from the entire library?

  • How can I get a date picker or wheel to show up in the form to make filling in a form with a lot of

    how can I get a date picker or wheel to show up in the form to make filling in a form with a lot of dates more easy?

    There is no built-in date picker available for forms created in Acrobat. There are some third-party solutions involving JavaScript (either a large collection of fields or a custom dialog) though. Also, text fields with date formatting will use a wheel type date picker on Android/iOS devices with Adobe Reader.

  • I have a DVD Acrobat Pro 9. I upgraded laptops and trying to install but the DVD is not readable. How can I get a new DVD or Download Acrobat Pro 1. The product is registered and I have the serial number. PS: Contacting Adobe on this issue is impossible..

    I have a DVD Acrobat Pro 9. I upgraded laptops and trying to install but the DVD is not readable. How can I get a new DVD or Download Acrobat Pro 1. The product is registered and I have the serial number. PS: Contacting Adobe on this issue is impossible... direct support stinks.

    Download AA 9 Pro from http://helpx.adobe.com/acrobat/kb/acrobat-downloads.html. Make a new backup for your archive. You might also take the DVD to your library to see if it is a drive problem. You might also carefully clean the DVD with water and soap (do not use anything that would scratch the surface or you have destroyed it for sure) and see if that solves the problem. This is particularly an issue if you have finger prints or other crud on the DVD. However, it could also be a bad drive as I mentioned. Hopefully the download solves your problem in any case (I would backup the download to CD and/or backup HD).

  • I have MAC OS X 10.6.8 (up-to-date). How can I get screen mirroring to my Apple TV to work?  The icon does not appear at top status bar..

    I have MAC OS X 10.6.8 (up-to-date). How can I get screen mirroring to my Apple TV to work?  The icon does not appear at top status bar..

    Welcome to the Apple Support Communities
    See > http://support.apple.com/kb/HT5404 AirPlay Mirroring is compatible with Mid 2011 and newer MacBooks Air, and OS X Mountain Lion.
    As you have Mac OS X Snow Leopard, you haven't got a compatible MacBook Air, so you can't use AirPlay Mirroring. However, you can use a third-party app as AirParrot to mirror the MacBook onto your Apple TV > http://www.airparrot.com

  • How can I get authentication and authorization through OS X open directory with the Sun ZFS STOR ZS3-2

    how can I get authentication and authorization through OS X open directory with the Sun ZFS STOR ZS3-2
    I have configure NFS, I need help configuring the share that I created in the Sun ZFS STOR ZS3-2 to connect with the OS X Open Directory

    Hi,
        You may  try checking the help page for ldap configuration :
    https://<Appliance_IP>:215/wiki/index.php/Configuration:Services:LDAP
    ZFS Storage supports LDAP, NIS, AD as directory service.
    Hope Open Directory is also based on LDAP and may work in similar fashion.
    Thanks
    Nitin

  • How can I get Acrobat Reader X to send my pdf to the printer?

    My pdf just looks at me while I push all of the buttons, file menus and keyboard shortcuts associated with printing and it does nothing. No dialog box, no nothing. All three of my printers work and i've tried them all. It just doesn't do anything. Any suggestions? I really need help here.

    From: Pat Willener [email protected]
    Sent: Monday, July 30, 2012 9:16 PM
    To: vinniereed
    Subject: How can I get Acrobat Reader X to send my pdf to the printer?
    Windows 7; Acrobat Reader 10.0; local and online.
    Thanks,
    Vinnie
    Re: How can I get Acrobat Reader X to send my pdf to the printer?
    created by Pat Willener <http://forums.adobe.com/people/pwillener>  in Adobe Reader - View the full discussion <http://forums.adobe.com/message/4588698#4588698

  • HT201320 How can I get TRASH to show on my 5S when I slide the email to the right? I see more & Archive

    How can I get TRASH to show on my 5S when I slide the email to the left? I see more & Archive

    Hi SCAnn!
    Here is an article that can explain that feature for you:
    iOS: Understanding Gmail Archive
    http://support.apple.com/kb/ht4207
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • I had to restore my iPhone and lost a lot of music!!! How can I get it back?! No cloud appears next to the songs, just buy!

    I had to restore my iPhone and lost a lot of music!!! How can I get it back?! No cloud appears next to the songs, just buy!

    You should be storing everything on your computer and you should always backup your computer.  Have you failed to do these things?
    If so, not good, then you can redownload some iTunes purchases in some countries.  Open iTunes store, click Purchased under Quick links

  • If I purchased a movie, from a computer a LONG time ago like 3 years but recently I changed computers how can I get that movie back? p.s. I bought the movie from iTunes

    If I purchased a movie, from a computer a LONG time ago like 3 years but recently I changed computers how can I get that movie back? p.s. I bought the movie from iTunes

    If you don't have the movie on the old computer and you don't have the movie backed up on a disc somewhere, your only choice is to purchase the movie again. Currently, movie downloads are a one time deal andit is your responsibility to have a backup copy.
    If you have the movie on the other computer still, you can burn it to a DVD and then copy it over to the new computer.
    Personally, I have two computers and when I make a purchase on one, iTunes automatically copies it to the other and I have never lost videos or music in this manner.

  • HT4623 How can I get my iPhone 4S unlocked - it's currently locked on the 3 network - 3 can't do it unless I have an account with them.

    How can I get my iPhone 4S unlocked - it's currently locked on the 3 network and they won't unlock it unless I have an account with them.

    Only 3 can authorize unlocking it. If you don't meet their conditions, then you're out of luck.

  • Please help I just accidentally deleted a very very important note from my "Notes" on my iPhone 4s.  How can I get it back? Is there a "Trash" file somewhere for deleted notes?  Thank you, Susan

    Please help I just accidentally deleted a very very important note from my "Notes" on my iPhone 4s.  How can I get it back?
    Is there a "Trash" file somewhere for deleted notes?
    Thank you,
    Susan

    Had you never backed up the phone before? When you saw the iTunes logo and cable, the device was in recovery mode. The data was already lost. The only way to recover from that is to restore the device, which will delete all of your data. You will only be able to restore to your last backup, whenever that was. Sorry this happened, but this highlights the importance of doing regular backups. The backup is the only protection you have against a problem like this.

  • Than how can i get java class by using it's class file?

    Hi
    After compilation of a java program, it creates a class file.
    After getting class file suppose class file has been deleted.
    Than how can i get java class by using it's class file?
    Thanks in advance.

    get a decompiler and run your class file through it--I'll assume you want the source code back and that you are not trying to recover a missing class file by attempting to use the class file that is missing--if it's missing, then I've not a clue on how to get it back by using what is already missing.
    BTW: many of your compilers have source control--if it does, just restore your missing file.

Maybe you are looking for

  • Book & software advice for creating a program that would utilize USB.....

    Hey All, I've been a mac user for about two years now and have become more and more impressed by the stability offered by Unix. However, I still live in both worlds (XP and OSX) and my programming roots are windows based (sorry ). Here's the problem:

  • Service reads data but Bpel process does not start

    i have a very simple project. I have db2(as400) adapter and it reads data, i will receive data, transfom and send to oracle database. I deployed the project successfuly but when instance start i see the service reads the data but bpel process does no

  • Navigation link for an existing view

    I am currently using CRM 5.0.  In CRM 5.0 how we can set up new navigation link for an existing view or view set.

  • Revert custom component to default state?

    I am building a website which has multiple pages, and within those pages are image galleries. I have used custom components for the galleries so i dont end up with an unmanagable amount of main pages. (15 pages containg galleries of up to 7 images) T

  • ORG Unit and User groups

    Hi, I need the function modules that can : 1) Fn. mod. to give all user groups to which a user belongs 2) Fn. mod. to give all Org. Units to which a user belongs Full marks..... Regards, Gaurav.