WinMerge *.PDF plugin

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

WinMerge *.PDF plugin

#1 Post by __philippe » Sat Nov 09, 2019 12:00 pm

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

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

Re: WinMerge *.PDF plugin

#2 Post by Midas » Sat Nov 09, 2019 3:44 pm

Nice! I will try it in Win7 in the foreseeable future -- I'm a little swamped ATM. Thanks for sharing. :)

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

Re: WinMerge *.PDF plugin

#3 Post by TP109 » Sat Nov 09, 2019 7:42 pm

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: 5344
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: WinMerge *.PDF plugin

#4 Post by Midas » Sun Nov 10, 2019 7:44 am

And thanks for testing this, TP109. 8)

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

Re: WinMerge *.PDF plugin

#5 Post by erickner93 » Fri Nov 15, 2019 9:05 am

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

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

Re: WinMerge *.PDF plugin

#6 Post by webfork » Sat Nov 16, 2019 7:12 am

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: 539
Joined: Sat Apr 08, 2006 7:12 pm
Location: Midwestern US

Re: WinMerge *.PDF plugin

#7 Post by TP109 » Mon Nov 18, 2019 12:34 am

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: 9263
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: WinMerge *.PDF plugin

#8 Post by webfork » Tue Jan 28, 2020 8:41 pm

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: 9263
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: WinMerge *.PDF plugin

#9 Post by webfork » Sat May 09, 2020 7:19 pm

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

Post Reply