In this tutorial, we will show you how to convert a quote into CSV in PHP using PDF.co Web API.
Here’s the source PDF file and converted CSV output.
Step 1: PHP and HTML Source Code
To begin, let’s copy the PHP and the HTML source code here. Save it in a folder inside the /www or /htdocs directory depending on whether you are using XAMPP or WampServer.
Step 2: Start Apache Server
Next, start the Apache server in your control panel so we can run the program on our local machine.
Step 3: Run Program
Now, let’s run the program.
- In your browser, type in
localhost/Name of folder/HTML file.
- Next, add your API Key. You can get the API key in your PDF.co dashboard here.
- Then, input your source PDF file and click the Proceed button to send a request.
Step 4: Conversion Result
Great! Our program was a success. Click the temporary URL to view the output.
Step 5: PDF to CSV Demo
Here’s the PDF to CSV in action.
In this tutorial, you learned how to convert a quote into CSV using PHP. You learned how to use the PDF.co Web API to convert PDF into CSV. You also learned how to set up the code samples to get the converted output.