PDF

Enabling the feature

To enable the PDF export feature, go to Settings > Product Configurator > Save your design options, and enable the setting “User can save the configuration as PDF

Changing the PDF template

Overriding the template file

The PDF template can be overridden in the same way the WooCommerce templates would:

  1. The original template file can be found in woocommerce-mkl-pc-save-your-design/templates/pc-pdf-export/pdf.php
  2. Copy the file to your theme (NB: if you are using a public theme which will be updated, make sure to use a Child theme, or your changes will be removed when updating). E.g. my-theme/woocommerce/pc-pdf-export/pdf.php
  3. Edit the file to suit your needs

Overriding using hooks

[FILTER] PC.syd.pdf_template.arguments Override the arguments passed to the PDF template

[FILTER] PC.syd.pdf_download.pdf_options To override the Dompdf options object

[FILTER] PC.syd.pdf_download.pdf_content To override the HTML content of the PDF

[FILTER] PC.syd.pdf_download.paper_size To override the size of the PDF pages (default: A4)

[FILTER] PC.syd.pdf_download.orientation To override the orientation of the PDF pages (default: portrait)

Was this page helpful?