Print Page | Close Window

Search text in pages in Delphi

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: General Discussion
Forum Description: Discussion board for Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3524
Printed Date: 20 Apr 24 at 2:00AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Search text in pages in Delphi
Posted By: Amelie
Subject: Search text in pages in Delphi
Date Posted: 10 Nov 17 at 4:17PM
Hello!

I would like to know how to search for a word in all pages of the PDF file in Delphi please?

thank's

Amelie



Replies:
Posted By: Ingo
Date Posted: 10 Nov 17 at 6:34PM
Hi Amelie,

// This is a partly way in Delphi . . .

   QP := TDebenuPDFLibrary1312.Create;
   try
//     Here the activation with your user-/testkey is needed...
       okay  := QP.LoadFromFile(FName, '');
       lerrc := QP.LastErrorCode;

       If ( QP.EncryptionStatus > 0 ) Then
          QP.Decrypt;

       sl := TStringList.Create;
       pagetext := '';

       for i := 1 to QP.PageCount Do
       begin
          QP.SelectPage(i);
          QP.CombineContentStreams;
          sl.Text := QP.GetPageText(3);  // you can get it into a stringlist or ...
          pagetext := QP.GetPageText(3); // you can get it into a string ...

//        . . .
//        now you're able to search inside your searchstrings (in Delphi with pos-syntax) ...

Here you can find all other functionalities using QuickPDF:
http://www.debenu.com/docs/pdf_library_reference/FunctionGroups.php

Here you can find the developer guide:
http://www.debenu.com/products/development/debenu-pdf-library/help/developer-guide/


Cheers and welcome here,
Ingo



-------------
Cheers,
Ingo




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk