Public Ticket #3594054

Feature request: Customizable Offer PDF

Closed
Comments
16 Tickets 14
Sergio started the conversation 3 years ago on February 27, 2024 at 3:44pm

Hello,

It would be beneficial to have increased flexibility in customizing offer PDFs. 

Enable HTML support for shortcodes like "b2bking_custom_content_after_logo_offer_pdf_left_1". 
This would allow us to inject links to custom files attached to the offer, such as design proposal PDFs for products with customizable designs.

Or ideal solution:

Provide a customizable PDF template for granular control over the elements of the PDF, allowing for better presentation and additional information as needed.

Thank you for considering this request!

16 Tickets 14
Sergio replied 3 years ago on February 27, 2024 at 6:04pm

Also, on Frontend / Offer PDF: it'd be great to be able to generate dynamic "b2bking_custom_content_after_logo_offer_pdf_left_1" for each Offer. Currently it's a global setting for all Offers.

2,762
KingsPlugins replied 3 years ago on February 27, 2024 at 7:19pm

Hello Sergio,

Our plugin is currently using the PDFMake library for generating PDFs. This generates the PDF files through a JS script.

I checked that hook you mentioned: from what I can see, we are not explicitly removing HTML - I believe it must be a result of how PDFMake processes data, so unfortunately I am not sure how we could add support for it in that hook.



While I am not sure how it would be possible to create a specific template, it is possible to do this by creating your own JS function to generate the PDF.

I wrote a PHP code snippet that does this, which can be added to functions.php:

https://pastecode.io/s/adcwbv72

In this snippet, you can modify the JS function as needed. This gives you complete control over the PDF generation, content and layout.


Kind regards,

Stefan

1

Sign In