Question: I want to search keywords in hundred of PDF files in a directory, I want want to search the keywords in metadata in PDF files, how can I do this work?
Can VerPDF direct me to the right resources so I may accomplish this task? Thanks.
Answer: According to your needs, software VeryPDF Advanced PDF Tools SDK, which provides library for searching this directory for a specific species name and generate a list of the documents that match the keyword, and the corresponding page number. This software allows you to do searching PDF metadata in batch. After searching, all the PDF metadata like file name, PDF version, security, file page count, title, author, etc. will be shown under MS Dos Window if you use command line tool. Please get more details on homepage, in the following part, let us check how to use this software.
Step 1. Free download Advanced PDF Tools SDK
- When downloading finishes, you will get a zip file. You need to extract it to folder then you can open it normally.
- There are lots of code templates in the extracted folder for your reference. You can find library once you open it.
Step 2. Get PDF metadata for searching multiple PDF files keywords and page number.
- When you use this function, you may need to use this parameter:
-r: The option -r is to show the detail information of selected PDF files, including file name, PDF version, security, file page count, title, author, etc.
Here is one example:
pdftools -i "C:\input.pdf" –r
- When you cal it from VB, please refer to the following code template:
Private Sub VBCOMTest_Click()
Dim nRet As Long
Dim strCmd As String
strCmd = "pdftools.exe" & " -r ""0 0 612 792"" -j ""612 792 true"""
strCmd = strCmd & " -$ XXXXXXXXXXXXXXX"
strCmd = strCmd & " -i C:\test.pdf"
strCmd = strCmd & " -o C:\_test.pdf"
Set PDFToolsCOM = CreateObject("PDFTools.PDFToolsCOM")
nRet = PDFToolsCOM.com_VeryPDF_PDFTools(strCmd)
Set PDFToolsCOM = Nothing
MsgBox (Str(nRet))
End Sub
Please check more examples on SDK user manual. During the using, if you have any question, please contact us as soon as possible.