In this tutorial, we will show you how to convert a purchase order into CSV using PDF.co and PHP

  1. Source Code
  2. Start Apache Module
  3. Run PHP Program
  4. Conversion Result
  5. PDF to CSV Demo

Here’s the sample PDF file and the converted CSV output

Source PDF File and CSV Output
Source PDF File and CSV Output

Step 1: Source Code

  • First, copy the PHP and HTML sample code here. Then, save it in a folder inside the /www or /htdocs directory depending on whether you are using XAMPP or WampServer.

Source Code

Step 2: Start Apache Module

  • Next, start the Apache module in the control panel so we can run the program on our local machine.

Start Apache Module

Step 3: Run PHP Program

Let’s run the program

  • Type the localhost/Folder name/HTML file in your browser.
  • Next, add your API Key. You can get the API key in your PDF.co dashboard here.
  • Then, load the source file and click on the Proceed button to send a request.

Run PHP Program

Step 4: Conversion Result

  • Once the program was successful, click on the URL to download the CSV file.

Conversion Result

Step 5: PDF to CSV Demo

  • Here’s the PDF to CSV in action.
PDF to CSV Demo
PDF to CSV Demo

In this tutorial, you learned how to convert a purchase order into CSV using Zapier. You learned how to set up the code samples to get the converted output. You also learned how to use the PDF.co Web API to convert PDF files into CSV.

Related Pages:

Related Samples: