xPDFSearch 1.11 - 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

Post Reply
User avatar
nn1k3
Member
Member
Posts: 136
Joined: 2007-02-06, 16:59 UTC

Post by *nn1k3 »

Once again I am grateful to Lefteous, this time for xpfsearch .

When you download a bunch of pdf files, they may acquire today's date. This is how you can then change the date to the date that the pdf was created:

"Change Attributes"
Check "change plugin attributes"
Plugin = tc
Property = writedate
Value = [=xpdfsearch.Created]
iana
Senior Member
Senior Member
Posts: 345
Joined: 2010-07-27, 22:00 UTC

Post by *iana »

I had some free time and tweaked Lefteous code to add a Linearized field.
I hope Lefteous doesn't mind me messing with his work I only added a few lines to his code.
Some info about Linearized (aka Fast Web view) pdf's:
http://en.wikipedia.org/wiki/Pdf#File_structure
here is the patch which adds a Linearized field:

Code: Select all

diff -r -u1 xpdfsearch_1.05_source-orig/xPDFSearch/PDFMetadataExtractor.cpp xpdfsearch_1.05_source/xPDFSearch/PDFMetadataExtractor.cpp
--- xpdfsearch_1.05_source-orig/xPDFSearch/PDFMetadataExtractor.cpp	2009-05-03 11:00:00.000000000 +0200
+++ xpdfsearch_1.05_source/xPDFSearch/PDFMetadataExtractor.cpp	2011-06-05 00:33:18.708745600 +0200
@@ -99,2 +99,5 @@
 		break;
+	case fiLinearized:
+		*(BOOL*)fieldValue = doc.isLinearized();
+		break;
 	default:
diff -r -u1 xpdfsearch_1.05_source-orig/xPDFSearch/xPDFInfo.cpp xpdfsearch_1.05_source/xPDFSearch/xPDFInfo.cpp
--- xpdfsearch_1.05_source-orig/xPDFSearch/xPDFInfo.cpp	2009-05-03 11:00:00.000000000 +0200
+++ xpdfsearch_1.05_source/xPDFSearch/xPDFInfo.cpp	2011-06-05 00:37:42.067436800 +0200
@@ -83,2 +83,3 @@
 	case fiTagged:
+	case fiLinearized:
 	case fiCreationDate:
@@ -149,2 +150,3 @@
 	case fiTagged:
+	case fiLinearized:
 	case fiCreationDate:
diff -r -u1 xpdfsearch_1.05_source-orig/xPDFSearch/xPDFInfo.h xpdfsearch_1.05_source/xPDFSearch/xPDFInfo.h
--- xpdfsearch_1.05_source-orig/xPDFSearch/xPDFInfo.h	2009-05-03 11:00:00.000000000 +0200
+++ xpdfsearch_1.05_source/xPDFSearch/xPDFInfo.h	2011-06-05 00:29:29.218755200 +0200
@@ -62,3 +62,3 @@
 	"Document Start", "First Row",
-	"Copying Allowed", "Printing Allowed", "Adding Comments Allowed", "Changing Allowed", "Encrypted", "Tagged", 
+	"Copying Allowed", "Printing Allowed", "Adding Comments Allowed", "Changing Allowed", "Encrypted", "Tagged", "Linearized", 
 	"Created", "Modified",	
@@ -72,3 +72,3 @@
 	ft_string, ft_string,	
-	ft_boolean, ft_boolean, ft_boolean, ft_boolean, ft_boolean, ft_boolean,
+	ft_boolean, ft_boolean, ft_boolean, ft_boolean, ft_boolean, ft_boolean, ft_boolean,
 	ft_datetime, ft_datetime,	
diff -r -u1 xpdfsearch_1.05_source-orig/xPDFSearch/xpdfsearch_base.h xpdfsearch_1.05_source/xPDFSearch/xpdfsearch_base.h
--- xpdfsearch_1.05_source-orig/xPDFSearch/xpdfsearch_base.h	2009-05-03 11:00:00.000000000 +0200
+++ xpdfsearch_1.05_source/xPDFSearch/xpdfsearch_base.h	2011-06-05 00:30:56.384092800 +0200
@@ -6,3 +6,3 @@
 // FIELD_COUNT is used to globally set the number of supported fields.
-const int FIELD_COUNT = 21;
+const int FIELD_COUNT = 22;
 
@@ -13,3 +13,3 @@
 	fiDocStart, fiFirstRow,
-	fiCopyingAllowed, fiPrintingAllowed, fiAddCommentsAllowed, fiChangingAllowed, fiEncrypted, fiTagged,
+	fiCopyingAllowed, fiPrintingAllowed, fiAddCommentsAllowed, fiChangingAllowed, fiEncrypted, fiTagged, fiLinearized,
 	fiCreationDate, fiLastModifiedDate,	

I hope Lefteous can integrate this in a new official build, I've tested it and it and had no problems so far :)
If anyone want's it I can provide a binary file too.
iana
Senior Member
Senior Member
Posts: 345
Joined: 2010-07-27, 22:00 UTC

Post by *iana »

I noticed that 1.05 was build with the older xpdf 3.02pl3,
This is a wdx build with the updated 3.02pl5 (3.02pl6 has no win32 changes),
I updated the translation for the Linearized field only (blame google for any mistakes),
and bumped the version number to 1.05.1

Here's the wdx it's about 270k:
http://www.megaupload.com/?d=4RL0XFQ7

And the modified source (with xpdf 3.02pl5) about 570k:
http://www.megaupload.com/?d=MRLOK383

I have a bunch of pdf files and the free Adobe Reader can Linearize pdf's
(in options when saving files select save for fast web view, these files usually render faster)
I needed this field plus there's been two security updates to xpdf, that's why I updated and uploaded the wdx,
regarding the source Visual Studio 2005 and above has problems compiling xpdf (no default int etc it's an old problem)
so if you have problems compiling use VS 2003 or try and find the free Microsoft Visual C++ Toolkit 2003.
iana
Senior Member
Senior Member
Posts: 345
Joined: 2010-07-27, 22:00 UTC

Post by *iana »

Lefteous has updated his file to 1.06 get it here:
http://www.totalcmd.net/plugring/xPDFSearch.html
tanks again for xPDFSearch :)
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Danish translation for version 1.06:

Code: Select all

[dan]
Title=Titel
Subject=Emne
Keywords=Stikord
Author=Forfatter
Application=Anvendelse
PDF Producer=PDF fremstillet med
Number of Pages=Sideantal
PDF Version=PDF-version
Page Width=Sidebredde
Page Height=Sidehøjde
Document Start=Dokumentstart
First Row=Første række
Copying Allowed=Kopiering tilladt
Printing Allowed=Udskrivning tilladt
Adding Comments Allowed=Tilføjelse af kommentarer tilladt
Changing Allowed=Ændringer tilladt
Encrypted=Krypteret
Tagged=Mærket
Linearized=Lineariseret
Created=Oprettet
Modified=Ændret
Text=Tekst
mm|cm|in|pt=mm|cm|in|pt
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Peter
Power Member
Power Member
Posts: 2064
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

Installing the new version results in a crash of TC after pressing OK in the last dialogue (the list of all content plugins). But it is still installed.

Have other users the same behaviour?

Peter
TC 10.xx / #266191
Win 10 x64
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Peter
Can you give details on the crash? Any error message or something like that?
User avatar
Peter
Power Member
Power Member
Posts: 2064
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

Lefteous wrote:2Peter
Can you give details on the crash? Any error message or something like that?
No, sorry - no details existing.
As written above TC crashes after "OK" - no message, no alert ...
I loaded it again, rebooted the PC - same problem with Win XP Prof.

Peter
TC 10.xx / #266191
Win 10 x64
zeeko
Junior Member
Junior Member
Posts: 50
Joined: 2009-02-21, 19:57 UTC

Support for Unicode file names

Post by *zeeko »

I needed support for Unicode file names so I've made some changes to xPDFSearch source code.
There is also an update to xpdf 3.03 and Croatian translation.
Modified source code can be downloaded from http://dl.dropbox.com/u/13501688/xpdfsearch_1.08_source.zip.
I've made a few tests on Unicode file names and had no problems.
I hope that Mr. Lefteous will accept code changes and create new version of xPDFSearch plugin.
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

Nice demonstration of OSS. :!:

I would not recommend /ZP1 option for x64 though I only noticed problems with packer plugins so far.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2zeeko
Thanks for your contribution. I will have a look at it soon.
User avatar
nn1k3
Member
Member
Posts: 136
Joined: 2007-02-06, 16:59 UTC

Post by *nn1k3 »

When you have many files, custom columns based on xpdfsearch helps you find which ones are encrypted or have other properties. I wish it could also show whether a pdf has bookmarks or not.
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

Lefteous wrote:I will have a look at it soon.
How soon is soon?
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2tbeu
I already did.
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

You are really funny. :lol: And do you plan to officially integrate zeekos changes?
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
Post Reply