Introduction
Wix Velo is a full-stack development platform that empowers you to build, manage and deploy professional web apps rapidly. You can use PDF Generator API to quickly generate PDF documents using the data you already have in your Velo site (e.g. store orders, database records etc.). You can find the example integration built with Velo and PDF Generator API here.
Resources
Use-cases
Here are some use-cases that you might have in your application. If you have a use-case that we have not covered, please contact us support@pdfgeneratorapi.com
Generate a PDF with data from your Wix site
It the previous examples we have used static object as the data
parameter value, but it is also possible to use your data from Wix database.
The ability to use data directly from your database gives you a lot of possibilities to generate transactional documents like invoices, packing slips, certificates and reports.
In the example repository you can find getStoreProducts
function in backend/datasource.jsw
which shows how to get your product records from Wix database.
View code examples
Send generated PDF via email
Most of the transactional email APIs (e.g SendGrid, Mailchimp) allow you to add attachments to your email as base64 encoded content.
You can use the same generatePDF
function to generate the base64 PDF content and add it directly to your email API request.
View code examples
Generate a URL to PDF
Our API allows you to generate PDF and store it temporarily (for 30 days) to our service.
You can access the generated PDF via unique URL that you receive as API request response.
You can use the generatePDFUrl
function that you can find in backend/pdfapi.jsw
.
You can use the link to open generated PDF from your application without storing it on your application.
View code examples
Generate a PDF and save to Wix database
You can generate base64 encoded PDF file that you can store to your Wix database and later re-use to send emails, display to user or prompt download.
View code examples