Links for this example
About this example
This example uses the PDF Generator API as a tool to create a PDF template that will be used by your site to create a PDF document from site data. To get started, do the following:
From the Wix Package Manager in the Editor, install the pdf-generator-api NPM library.
Go to the Account Settings page of your PDF Generator API account.
Copy the API KEY, and the API SECRET codes from the Settings page into their appropriate places in the pdfGenerator.jsw file of the example template.
To create a template, go to the Templates page of your PDF Generator API account.
Click on the New Template button.
Select the No Data option.
Select Import from the File menu.
Import the pdf-example-template.json file.
Save the newly created template.
Refresh the templates page to see your new pdf template.
Copy the template’s ID to the ID field in the code in the pdfGenerator.jsw file.
Publish your site.
The link returned from the call to the API is an external link. Since wix-location.to() only works for external links on a published site, you will need to publish your site to see the generated PDF.