xPDFSearch 1.41 - Content plugin to search text in PDF files

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

zeeko
Junior Member
Junior Member
Posts: 50
Joined: 2009-02-21, 19:57 UTC

Re: xPDFSearch 1.11 - Content plugin to search text in PDF files

Post by *zeeko »

zeeko
Junior Member
Junior Member
Posts: 50
Joined: 2009-02-21, 19:57 UTC

Re: xPDFSearch 1.11 - Content plugin to search text in PDF files

Post by *zeeko »

2Mr Ghisler
xPDFSearch content plugin keeps PDF file open (cache mode) until it gets command to open new file.
If there is a request to change file attributes from plugin's values, operation can't complete because file is still open.
It is possible to change file create/modify date if file is open without read-write share flags. This is not the best solution. PDF file could be externally modified while open in plugin and read from plugin would fetch wrong addresses.
Content Plugin Interface describes how to cache data in ContentGetValue. It mentions that TC will call for the next file when previous can be closed. It doesn’t mention when to close single file.
Would it be possible for TC to send close command (ContentGetValue with new flag maybe) to lister plugin:
- before attempting to modify file (in Change Attributes and Multi Rename Tool)
- for the last file in directory
- for the file under cursor if tooltip uses values from plugins
xPDFSearch uses 100ms timer to close the last open file, but this doesn’t allow file name/attributes modification.
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: xPDFSearch 1.11 - Content plugin to search text in PDF files

Post by *nsp »

zeeko wrote: 2022-06-12, 20:06 UTC 2Mr Ghisler
xPDFSearch content plugin keeps PDF file open (cache mode) until it gets command to open new file.
If there is a request to change file attributes from plugin's values, operation can't complete because file is still open.
It is possible to change file create/modify date if file is open without read-write share flags. This is not the best solution. PDF file could be externally modified while open in plugin and read from plugin would fetch wrong addresses.
Content Plugin Interface describes how to cache data in ContentGetValue. It mentions that TC will call for the next file when previous can be closed. It doesn’t mention when to close single file.
Would it be possible for TC to send close command (ContentGetValue with new flag maybe) to lister plugin:
- before attempting to modify file (in Change Attributes and Multi Rename Tool)
- for the last file in directory
- for the file under cursor if tooltip uses values from plugins
xPDFSearch uses 100ms timer to close the last open file, but this doesn’t allow file name/attributes modification.
What could be done by TC is:
  • enhance as suggested ContentGetValue with a no-cache attribute
  • add a new function ReleaseFile
  • unload used plugins (src only) if renaming/changing attribute fail then retry without calling it.(This could fix some current issues with old/existing plugins)
zeeko
Junior Member
Junior Member
Posts: 50
Joined: 2009-02-21, 19:57 UTC

Re: xPDFSearch 1.11 - Content plugin to search text in PDF files

Post by *zeeko »

+3 :D
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: xPDFSearch 1.11 - Content plugin to search text in PDF files

Post by *ghisler(Author) »

If you had suggested this a week or two earlier, I would have added a function immediately. But TC 10.50 is now a "release candidate", which means no more new functions until release. Why? The beta test has already lasted more than 9(!) weeks. Each new function make the test take even longer, because each new feature also means new bugs. This sound like a feature which will add a long trail of new bugs, e.g. when the function is called in the wrong moment or a call gets forgotten when the user aborts renaming, etc.

I will put it on my wish list for later, though.

You could either offer two versions of the plugin, one used for custom columns and one used for renaming, or add a small configuration executable where the user can switch between the two modes.
Author of Total Commander
https://www.ghisler.com
zeeko
Junior Member
Junior Member
Posts: 50
Joined: 2009-02-21, 19:57 UTC

Re: xPDFSearch 1.11 - Content plugin to search text in PDF files

Post by *zeeko »

OK, until the next round of beta versions, hopefully.
Maybe ContentStopGetValue function could be used instead of proposed ReleaseFile function.
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: xPDFSearch 1.11 - Content plugin to search text in PDF files

Post by *nsp »

zeeko wrote: 2022-06-14, 09:12 UTC Maybe ContentStopGetValue function could be used instead of proposed ReleaseFile function.
if it is for MRT you could add a field called releaseCache and state in the help about how to use.
For Attribute change, i do not know if it could work.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: xPDFSearch 1.11 - Content plugin to search text in PDF files

Post by *ghisler(Author) »

Using ContentStopGetValue is probably not a good idea, it may crash plugins which don't expect it at that moment. A separate ReleaseCache function would be better.
Author of Total Commander
https://www.ghisler.com
User avatar
Elwin_Ransom
Junior Member
Junior Member
Posts: 38
Joined: 2022-07-31, 18:14 UTC
Location: Perelandra

Re: xPDFSearch 1.11 - Content plugin to search text in PDF files

Post by *Elwin_Ransom »

2zeeko
Could you please compile a version with latest commits? This one is especially interesting: «get options from ini file».
AnniePerson
Junior Member
Junior Member
Posts: 4
Joined: 2020-01-24, 12:37 UTC

Re: xPDFSearch 1.11 - Content plugin to search text in PDF files

Post by *AnniePerson »

Can I search also in the bookmarks of PDF files?
I have a number of scanned jazz fakebook. Wheras the content pages are just scanned pictures that cannot be searched most of them have bookmarks that are text and should be searchable
zeeko
Junior Member
Junior Member
Posts: 50
Joined: 2009-02-21, 19:57 UTC

Re: xPDFSearch 1.11 - Content plugin to search text in PDF files

Post by *zeeko »

xPDFSearch v1.36
  • New field: Outline - search outlines (bookmarks) titles
  • New attribute: O - PDF has outlines (bookmarks) directory
  • Options for plugin in TC content plugin ini file.
  • Restored open PDF file with write deny share.
https://github.com/tgotic/xPDFSearch/releases
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: xPDFSearch 1.36 - Content plugin to search text in PDF files

Post by *Usher »

2zeeko
Unfortunately, version 1.36 for XP doesn't work again:
TC error wrote:---------------------------
Total Commander
---------------------------
This is not a valid plugin!

You can find valid plugin files on www.ghisler.com under section 'Addons'.
---------------------------
OK
---------------------------
BTW. Could you change the version number in the Subject of your comments when publishing a new version, please?
Andrzej P. Wozniak
Polish subforum moderator
User avatar
Elwin_Ransom
Junior Member
Junior Member
Posts: 38
Joined: 2022-07-31, 18:14 UTC
Location: Perelandra

Re: xPDFSearch 1.11 - Content plugin to search text in PDF files

Post by *Elwin_Ransom »

2zeeko
Version 1.36, x86 on TC 10.52 & Windows 10 21H2:
Message "File xPDFSearch.wdx not found!" in column fields
https://0x0.st/onB2.png
This may have already been fixed in the last commit, but I'll leave this report just in case.

Updated
Yes, this is fixed in the latest release 1.36a.
zeeko
Junior Member
Junior Member
Posts: 50
Joined: 2009-02-21, 19:57 UTC

xPDFSearch 1.36a - Content plugin to search text in PDF files

Post by *zeeko »

xPDFSearch v1.36a
Fixed decorated function names in xPDFSearch.wdx (32-bit plugins).

xPDFSearch.wdx64 is working in v1.36 and 1.36a
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: xPDFSearch 1.36a - Content plugin to search text in PDF files

Post by *Usher »

2zeeko
Now it installs OK. Thanks for both quick fix and subject change.
Andrzej P. Wozniak
Polish subforum moderator
Post Reply