Compare PDF documents using C#

  • Thread starter Thread starter PS
  • Start date Start date
P

PS

Hi,

Is there a way to compare PDF, Word Document, Excel using C# like WinDiff
utility that compares text file and display the result with the modified text
in both the document?
 
You can do it, but you will have to program different formats in unless you
are just comparing bits. A line in code can easily be compared by walking
the document and comparing lines. But this is code in each of the apps you
are talking about.

Let's take word for an example: To compare, you will have to read lines as
Word lines, not as lines in the file created by Word. Now, if you are using
Word 2007, you can actually compare XML, as that is the storage mechanism
(also true for Excel 2007). Assuming you are talking older versions of Word,
you then have to stoke up the Word libraries to read through the lines.

PDF presents the same problem, as what you see in the final document (viewed
in Reader, for example) is not what you will see if you open this in
notepad.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
 
Understood your point, do you have any example for the same?

Are there any legal issue if we use the PDF, Word, Excel library in .Net
application?

--
Thanks,
PS


Cowboy (Gregory A. Beamer) said:
You can do it, but you will have to program different formats in unless you
are just comparing bits. A line in code can easily be compared by walking
the document and comparing lines. But this is code in each of the apps you
are talking about.

Let's take word for an example: To compare, you will have to read lines as
Word lines, not as lines in the file created by Word. Now, if you are using
Word 2007, you can actually compare XML, as that is the storage mechanism
(also true for Excel 2007). Assuming you are talking older versions of Word,
you then have to stoke up the Word libraries to read through the lines.

PDF presents the same problem, as what you see in the final document (viewed
in Reader, for example) is not what you will see if you open this in
notepad.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
 
Back
Top