WinMerge *.PDF plugin

Share interesting information or links related to portable apps here.
Post Reply
Message
Author
User avatar
__philippe
Posts: 687
Joined: Wed Jun 26, 2013 2:09 am

WinMerge *.PDF plugin

#1 Post by __philippe »

Belatedly discovered the original WinMerge can be persuaded to compare *.PDF files with the simple addition of this plugin

Code: Select all

1. Unzip "xdocdiffPlugin_1_0_6d.zip" distro file into current WinMerge folder
   (use 7z 'x' option to preserve distro internal path structure).

2. Move "amb_xdocdiffPlugin.dll" to the newly created "MergePlugins" subfolder.
Tested fine under Win XP with oldish WinMerge 2.12.4.0 Unicode (circa 2009... :wink: ).

Any volunteer to try with recent WinMerge version under Win7 ?
https://portableapps.com/apps/utilities ... e_portable

TP109
Posts: 571
Joined: Sat Apr 08, 2006 7:12 pm
Location: Midwestern US

Re: WinMerge *.PDF plugin

#2 Post by TP109 »

Works for WinMergePortable ver. 2.14 and X-WinMerge versions 2.14 and 2.16 on XP.
Extract the contents of the xdocdiffPlugin folder (maintaining folder structure) from: xdocdiff WinMerge Plugin Page to:
  • \Bin\WinMerge for X-WinMerge
  • \App\WinMerge for the PortableApps version
If those extra readme files are unwanted in the application folder, unzip the xdocdiffPlugin zip archive somewhere, and copy xdoc2txt.exe and zlib.dll to the same folders above and copy amb_xdocdiffPlugin.dll to the MergePlugins folder.

Verify that that the plugin is installed and enabled by selecting Settings from the WinMerge Plugins menu, and that the Automatic Unpacking option is checked in the Plugins drop down menu. I had to restart the WinMerge in one case for the plugin to show up on the plugin list. In another, the options on the plugin menu were grayed out until I dragged a couple of pdfs onto the interface and loaded them. The plugin seems to work, but I didn't test it thoroughly either.
Last edited by TP109 on Mon Feb 10, 2020 8:31 pm, edited 2 times in total.

User avatar
Midas
Posts: 6727
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: WinMerge *.PDF plugin

#3 Post by Midas »

And thanks for testing this, TP109. 8)

erickner93
Posts: 1
Joined: Fri Nov 15, 2019 8:59 am
Contact:

Re: WinMerge *.PDF plugin

#4 Post by erickner93 »

Many characters are missing from the text versions of the PDFs shown in the WinMerge diff windows.

User avatar
webfork
Posts: 10823
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: WinMerge *.PDF plugin

#5 Post by webfork »

UPDATE: Recent retest with the latest version on 6/19 showed this process is giving an error. Will try to update with the corrected process.

---

The following steps should enable broad format compatibility for text comparison in WinMerge, including Word, Excel, PDF, LibreOffice, RTF, and more. Note that you can't make changes to DOCX files, this is just for comparison. You can save the results as a TXT file.

Steps
1. Download and extract the xdocdiff archive to a temporary folder

2. Copy the files "zlib.dll" and "xdoc2txt.exe" to both of the following folders inside your WinMerge Portable folders:

WinMergePortable\App\WinMerge\

WinMergePortable\App\WinMerge64\

4. Copy the file "MergePlugins\amb_xdocdiffPlugin.dll" to both of the following folders:

WinMergePortable-xdocdiff\App\WinMerge\MergePlugins

WinMergePortable-xdocdiff\App\WinMerge64\MergePlugins

5. Launch "WinMergePortable.exe"

6. From the menu, select Plugins - Automatic Unpacking

7. From the menu select Plugins - Plugin Settings and make sure all boxes are checked

---

To test with some documents, click File - Open and select 1, 2, or 3 documents to compare. If you have issues, set the File: Unpacker plugin in the Open window to "Automatic."

---

Related
NOTE: Big thanks to TP109 here or I would have walked away from this.

TP109
Posts: 571
Joined: Sat Apr 08, 2006 7:12 pm
Location: Midwestern US

Re: WinMerge *.PDF plugin

#6 Post by TP109 »

I edited my last post as I mistakenly linked to the plugin's source the first time. I also cleaned it up a bit to make it more readable.
webfork wrote: Sat Nov 16, 2019 7:12 am In the Open window, make sure Unpacker plugin is set to "Automatic." This appears to be something you have to select every time.
I haven't seen that with XP. Once it's set, it stays set.

I verified that edits to the PDF files in WinMerge can be saved to the txt, doc, and rtf formats. I was also able to save to docx, but MS Word complained about structural errors in the file when I tried to open it; however, that may be a problem with this particular machine too. That is not an issue as I usually create pdf documents in the rtf format using a program such as Jarte, which has the capability to easily export to the pdf format.
erickner93 wrote: Fri Nov 15, 2019 9:05 am Many characters are missing from the text versions of the PDFs shown in the WinMerge diff windows.
I did test for that and didn't see that issue on XP. It would be helpful to know which characters are missing. If that is indeed a problem, it could be a config issue, or specific to the OS and/or WinMerge version.

User avatar
webfork
Posts: 10823
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: WinMerge *.PDF plugin

#7 Post by webfork »

Update on this:
webfork wrote: Sat Nov 16, 2019 7:12 am ... in testing, there were several limitations: my process below does not appear to allow file analysis of PDF, ODT, and probably several other formats, but it worked very well with Microsoft Word. Also you can't make changes to DOCX files, this is just for comparison. You can save the results as a TXT file.
I tested this out with an installed version of WinMerge and, although I still wasn't able to make changes to DOCX files, the other available comparison tools seemed to work fine. Not sure how to make the plugin work effectively with Portable WinMerge.

User avatar
webfork
Posts: 10823
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: WinMerge *.PDF plugin

#8 Post by webfork »

webfork wrote: Sat Nov 16, 2019 7:12 am ...my process below does not appear to allow file analysis of PDF, ODT, and probably several other formats
I retested the process above and it worked fine with the latest version. Given the broad format support and important additional functionality, I'm going to add it to the live entry.

--- EDIT: The following was a part of an earlier process but moving it below to avoid confusion... ---

Batch operations

This is a huge deal for me. It can be done via command line operations. Probably the simplest and most useful function is to just list out the full path of the program and then the full path of two files in quotes. Save this as a text file with a ".bat" extension and then launch. The program will open with the first file compared to the second.

Example text:

"C:\Temp\WinMergePortable\WinMergePortable.exe" "C:\Temp\sale1.docx" "C:\Temp\sale2.docx"

More info: https://manual.winmerge.org/en/Command_line.html

kiwi
Posts: 1
Joined: Sun Sep 06, 2020 2:33 pm

Re: WinMerge *.PDF plugin

#9 Post by kiwi »

The xdocdiff PDF plugin uses a very old version of xdoc2txt (1.46). One of the features I was looking for, and found, in the latest version(2.20) is that it doesn't drop the space between two words when the font style changes from bold back to regular.

The latest (as of September 2020) version of xdoc2txt can be obtained from http://ebstudio.info/home/xdoc2txt.html

Installation is as easy as unpacking the xd2tx220.zip, and copying the new xdoc2txt.exe over the top of the version from xdocdiff (in the WinMerge executeable directory). I also copied the xd2txlib.dll into the same folder (possibly unnecessary, but disk is cheaper than time to translate the docs).

The interface between versions 1.46 & 2.20 may have changed, but not enough to break WinMerge.

Important, you will need to install the original xdocdiff plugin first (so you get the amb_xdocdiffPlugin.dll) which drives the whole process.

Hope you find this useful.

Tim

User avatar
vevy
Posts: 796
Joined: Tue Sep 10, 2019 11:17 am

Re: WinMerge *.PDF plugin

#10 Post by vevy »

kiwi wrote: Sun Sep 06, 2020 2:52 pm Hope you find this useful.
It was, and I got a new CLI tool out of it, so thanks!

Post Reply