How to Convert Purchase Order to CSV using PHP
In this tutorial, we will show you how to convert a purchase order into CSV using PDF.co and PHP.
Contents
Step 1: Source Code
- First, copy the PHP and HTML sample code. Then, save it in a folder inside the
/www
or/htdocs
directory depending on whether you are using XAMPP or WampServer.
![Source Code](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2Fe31dfa74d5983f511ee25839c86d6e83b54fa4a4-873x181.png&w=1920&q=75)
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](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2F56f6d00f58fb619f2681578a39b5afabd03c9779-835x515.png&w=1920&q=75)
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.
- Then, load the source file and click on the Proceed button to send a request.
![Run PHP Program](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2F0e2b04e89b38bf30a04e0123359f40da5de55360-957x303.png&w=1920&q=75)
Step 4: Conversion Result
- Once the program was successful, click on the URL to download the CSV file.
![Conversion Result](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2F00a22598a631628dc7a63d168d88de9201a47138-999x135.png&w=2048&q=75)
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.