JakubMelka / PDF4QT

Open source PDF editor.
https://jakubmelka.github.io/
GNU Lesser General Public License v3.0
727 stars 74 forks source link

PDF4QT Document Diff command line cmd line arguments ignored #182

Closed paucoma closed 4 months ago

paucoma commented 6 months ago

GUI Tool: PDF4QT Document Diff

Description of the problem: PDF4QTDocDiff does not open command line provided arguments as described in help.

image

To Reproduce: Open a command line prompt : Pdf4QtDocDiff c:\usr\tmp\a.pdf c:\usr\tmp\b.pdf

Expected behavior To Open the GUI of PDF4QTDocDiff with first positional Argument as left Document and second Positional Argument as right Document loaded.

My Investigation I have scanned through the source code and it appears as if this is not implemented in the GUI code.

PDFtool does implement the expected behaviour of taking into consideration the positional arguments PdfTool.exe diff c:\usr\tmp\a.pdf c:\usr\tmp\b.pdf the source code take the positional arguments into consideration: QStringList positionalArguments = parser->positionalArguments(); code permalink options.diffFiles = positionalArguments; code permalink pdf::PDFDocument leftDocument = reader.readFromFile(options.diffFiles.front()); code permalink

How I would use it: I have created a simple Batch script in the sendTo section of windows to open files for comparison directly from with the windows file explorer content menu. Much quicker than navigating from within the GUI ounce is is open to the file location that you have open within the file explorer.

pdf-diff.bat

       C:\opt\PDF4QT\Pdf4QtDocDiff.exe "%~f1" "%~f2"

Environment: OS: Windows 11 Pro version 23H2 PDF4QT Document Diff 1.3.7

JakubMelka commented 4 months ago

Fixed.