New: Markdown to PDF built for AI agents, PDF to E-Invoice for Factur-X/ZUGFeRD, and PDF to PDF/A for archive-ready PDF/A-3b.

Convert Scanned PDF into Searchable PDF in PHP using PDF.co Web API

3 MIN READ

In this tutorial, we will show you how to convert scanned PDF into searchable in PHP using PDF.co Web API. The image below shows the source file.

Input PDF File

Source Code

To begin, let’s copy the HTML and the PHP source code. Save it in a folder inside the /www or /htdocs directory depending on whether you are using XAMPP or WampServer.

Start Apache

Next, let’s start the Apache server so we can run the program on our local machine.

Run Program

Now, let’s run our program. Type in localhost/folder_name/sample.html in your browser. Then, enter your PDF.co API Key and the scanned PDF to be converted. You can get your API Key from the PDF.co dashboard.

Note: Go here to download our sample files.

Searchable PDF Output

PDF.co will return a temporary URL to access the searchable PDF output. Kindly open the URL to see the result.

Output PDF File

In this tutorial, you learned how to convert scanned PDF into searchable in PHP using PDF.co Web API. You also learned how easy it is to set up the code samples to get your program running right away.

Was this page helpful?

Related Tutorials

See Related Tutorials

Try it with your document.

Create an account, get an API key and test a request.

Get Started Free

© Copyright 2016-2026 Artifex Software, Inc d/b/a PDF.co — All Rights Reserved