Welcome to the ZIP to PDF Converter template! This template is designed to help you build an application that can convert multiple PDF files within a ZIP archive into an HTML table for easy access and download. This is particularly useful for users who need to handle batches of PDF documents and want a quick way to access them individually after uploading a single ZIP file.
To begin using this template, simply click on "Start with this Template" on the Lazy platform. This will pre-populate the code in the Lazy Builder interface, so you won't need to copy, paste, or delete any code manually.
Once you have started with the template, the next step is to deploy the app. To do this, press the "Test" button on the Lazy platform. This will initiate the deployment process and launch the Lazy CLI. The Lazy platform handles all the deployment details, so you don't need to worry about installing libraries or setting up your environment.
After pressing the "Test" button and the app is deployed, you will be provided with a dedicated server link to use the app. Here's how to use the interface:
If you wish to integrate this app into an external service or frontend, you can use the server link provided by Lazy to make API calls to the "/convert" endpoint. This endpoint accepts a POST request with the ZIP file and returns a JSON response with a success message and the HTML content for the table.
Here is a sample request you might send to the "/convert" endpoint:
POST /convert HTTP/1.1<br>
Host: [Your Server Link]<br>
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW<br>
<br>
------WebKitFormBoundary7MA4YWxkTrZu0gW<br>
Content-Disposition: form-data; name="zipFile"; filename="example.zip"<br>
Content-Type: application/zip<br>
<br>
[Binary data of the ZIP file]<br>
------WebKitFormBoundary7MA4YWxkTrZu0gW--
And here is a sample response you might receive:
{
"success": true,
"table_content": "<table>...</table>"
}
Use the JSON response to display the table on your own webpage or handle the data as needed for your application.
If you encounter any issues or have questions about using this template, the Lazy platform provides support to help you resolve them.
Happy building with the ZIP to PDF Converter template!