Using Adobe Reader has become the most common way to open PDF files fast and secure on PCs today. Highlighting PDFs may be an integrated feature, but it isn’t very functional unless you go for premium software versions. In such cases, our DEV IT engineers recommend using the dtSearch PDF highlighter for all your highlighting purposes. It even allows searches from other programs to retrieve information from Adobe Reader DC, XI, or X. It may be a paid tool. Still, it does come with 30-days of free access, which is enough time for you to learn whether it will be suited for your application or not. Let’s explore the steps needed to integrate it within your .Net application.
Following are the steps to integrate Dtsearch PDF highlighter within a .Net application.
1.) Configure Highlighter Toolbox in System
We must install the Highlighter Toolbox within our system and provide all the relevant permissions to the installed folder for the first step. Next, you can download the highlighter toolbox from the this link. This will provide you with 30 days of free access.
2.) Host your .Net application in IIS
Now, we all know how to configure a .Net application within IIS. Hence, I have hosted the .net application in IIS as per the following screenshot.
3.) Configure Highlighter toolbox’s web app folder within the .Net application
The highlighter toolbox provides you with one folder, proxy-webapp, which we need to configure within our .net application.
As per the screenshot, you can see the proxy -web app folder we need to configure in IIS within our .Net application.
As per screenshot 3, we have configured the proxy-webapp folder and given the domain name as a highlighter. But, of course, you can set any domain name.
We don’t need to make any changes in the proxy-webapp folder. Instead, we need to configure the folder within our .net application in the same virtual directory.
After configuring the proxy-webapp folder, we then try to run the highlighter service in our browser and check whether it is running successfully or not.
Ex. http://xyz.com/highlighter (our .net application domain + highlighter)
If the highlighter toolbox‘s proxy-webapp is configured successfully, it will appear to you as per the following screenshot.
4. Find the PDF documents in the .net application.
We need to find the PDF documents in our .net application using the search keyword. For example, I search with the word “nationality” in my .net application and find the PDF documents as a result.
5.) DTSearch API Call to get PDF file URL
The DtSearch will also provide you with one API to consume to get the PDF URL.
As per screenshot 6, after getting PDF documents resulting in our .net application, we need to make a Dtsearch API call to get PDF document URL.
When you click on the Full Case & Analysis button, you make API calls by passing the following two search parameters.
- Search Keyword
- PDF URL Path with domain name
As per screenshot 7, the orange box shows the search keyword “nationality,” and the red box is our PDF document path with our .net application domain name.
We get the following response from the dtSearch API with the Document URL. Open that URL in Iframe or a new tab for highlighting the word within the PDF file.
When you pass the document URL upon clicking the button, the PDF file will open and highlight the search word as per following screenshot.
You can use the previous hit and next hit buttons to directly jump between highlight words.
In this blog, we have explained how you can easily integrate the dtSearch PDF Highlighter service to highlight any word within PDF. We really hope that you enjoyed this blog. If you come across any issues in the process, then please feel free to drop a comment about it down below.
Latest posts by Harsh Parikh (see all)
- How to Integrate dtSearch PDF Highlighter within .Net application - March 31, 2022
- 4 Easy Steps to Host ASP.NET Core Web Application in Window Service - December 14, 2021