Welcome to DocumentCompare
DocumentCompare is an easy-to-use application for comparing text documents. Even minute changes between two versions of the same text are recognized and displayed concisely. In contrast to similar applications, DocumentCompare is able to preserve text formatting throughout the process of comparing the chosen documents. So-called “formatted text” with different fonts, sizes and styles (e.g. bold or italic) will be preserved unchanged.
This is why you can, for example, use DocumentCompare to find what changed from one version of a web page to another. HTML files and even Safari web archives (.webarchive) can be used as source files.
DocumentCompare is able to handle all files that can be read by Apple’s TextEdit. The files will even look the same, as both programs use Mac OS X’s text engine.
All you need to do to get a simple comparison of two text documents is to import both files into DocumentCompare. To import your files you can use both the “File” menu and the buttons in the toolbar (see “Interface Overview” below). Dragging files to the text columns will import them as well.
The text that goes into the left column is called the “old” document, while the one to the right is called the “new” document throughout the application and the documentation. This serves as an easy shorthand while working with the two files.
You can also copy the texts you wish to compare into the left and right text columns of any comparison window and then select “Compare Again” from the “Changes” menu.
The comparison window has four areas:
- The toolbar with its icons at the top ① ② ③
- The left text column with the “old” version of the text ④
- The right column with the “new” version of the text ⑤
- And finally the “List of Changes” table in the bottom part ⑥
Each of the labels numbered 1 thru 3 in the image above marks one of DocumentCompare’s basic functions:
- The “Import Old” button will open a window where you can select the “old” text file for the comparison.
- The “Compare Again” button will search your files for changes once more. This is especially useful if you have manually changed one of the texts (e.g. pasted it in from the clipboard).
- The “Import New” button will open a window where you can select the “new” text file for the comparison.
In the text columns, changes are marked by colored highlights. These, by default, are blue for paragraphs of text containing more complex changes, red for sections not found in the “new” text and green for text that was added in the “new” text. The defaults can be changed from the “Preferences” window, which is opened via “Preferences” in the “DocumentCompare” menu. You can change them to anything you like, if you click on the color wells.
The Preferences window contains the option “Always show details”. With this option enabled, changed paragraphs will always show changes within them and not just if the change is selected in the “List of Changes”.
List of Changes
The table in the bottom part of the document window (Number ⑥ in the “Interface Overview”) lists the changes that were found while comparing the old and the new text version. The first column (“Type”) describes the type of change made. Column two, three and four describe the change in greater detail.
Column two (“Old Text”) and four (“New Text”) display the old and new text relevant to the change. Column three contains an icon that visually represents the type of change in order to allow faster browsing through the changes.
The last three columns refer to the position of the change in the “old” document (“Old Position”) and “new” document (“New Position”). The first of these columns uses an icon to represent the unit of the numbers in the next two columns: for paragraphs this is the number of the paragraph counting from the first paragraph in each document, while for words this is the position of the characters within the changed section of text that is highlighted in blue in the text columns above.
For a quick description of the individual function of the icons, hover over the icon with your mouse cursor. After a short moment, a text label describing the icon will appear.
If no change is selected, all you see in the text columns are dimmed highlights which mark the parts of the text that were edited. Once you click one of the rows in the table, it is selected and both text columns automatically scroll to the corresponding section in the text. The highlights for selected changes are visually emphasized. In addition, the highlights are more detailed in case the selected section of text is of the “Changed” type.
You can click anywhere in a table row. You don’t have to click the icons. You can also use the cursor keys to select the next (⇡ cursor) or previous entry (⇣ cursor) in the list and you can use the right cursor key (⇢) to open and left cursor key (⇠) to close a selected change that has more detailed changes within it. This is signaled by the triangle on the far left of the change. This behaves just like a folder in the Finder’s list view. So in short, you can navigate the entire change hierarchy with your cursor keys.
Furthermore, you can press ⌘-⇡ or ⌘-⇣ to navigate to the previous or next change. This is so you don’t have to use the mouse to click into the “List of Changes” table if your text cursor is in one of the text columns.
Changes are represented at two levels of detail in most modes. To list the individual changes within a changed section of text, you can click the small triangle in the “Type” column of the “List of Changes”.
You can change the “Comparison Mode” from the “Changes” menu.
With this mode the top level is paragraphs and the lower level is words. Deleted or inserted paragraphs do not have more details at the word level, because the deleted or inserted text section as a whole only appears in one version of the text, but not in the other.
This mode’s top level of detail is sentences and the lower level is words. This mode is very good to use with texts that were heavily edited and reformatted.
In the “Words” mode, the top level is words and the lower level is characters.
With this mode, there is only a single level of detail and it is the finest there is: all characters that appear to have been deleted or inserted are listed with their positions.
Working with Comparison Files
A DocumentCompare file contains copies of both the “old” and “new” version of the document you have imported. Any changes you make in either of the versions will be stored in the comparison file (.docompare) once you save. This way, there is no risk of accidental changes to the original files you are comparing.
If you want to use the revised versions of your “old” or “new” text elsewhere, you can save them to separate files via “Export” from the “File” menu.
If you need spell-checking, you can enable it separately for the “old” or “new” text: either the “Edit” menu or the contextual menu (right-click or ctrl-click) offer all the checking options that your version of Mac OS X has to offer.
PDF text import
PDFs usually don’t contain the text you see when opening a PDF document. They often simply contain all the letters and their positions on the page.
For a human, it is easy to read the text that way, but it requires a lot of knowledge about the way text and language are used in the written form. Knowledge that you have, of course.
But if you try and think about what rules apply here, where a sentence or paragraph ends for example, you will find that this is not so easy to explain in detail. This makes it difficult to write software that does the right thing when extracting the text from a PDF.
Extracting the text involves a lot of guesswork, which computers, lacking the necessary intelligence and understanding, are very bad at. Currently, DocumentCompare simply treats each line of characters on a PDF page as a line of text.
The result is useful, but there may be extra or missing returns and spaces for example. Images and all text you can’t select in Apple’s Preview will not be imported.
A future version of DocumentCompare may improve on this, but don’t expect any miracles. If you really need state-of-the art quality when it comes to getting text from a PDF, please consider one of the many dedicated applications that are available for this purpose. You can find them on the App Store and elsewhere on the internet.