Are custom PDF layouts possible?
If none of the built in PDF layouts are what you are looking for then there are two solutions for your own custom PDF template.
First option: code your own template in PHP.
Print products PDF
Therefore you can use one of the two filters:
- woocommerce_print_products_product_html
- woocommerce_print_products_product_final_html
Print Posts Plugin
- wordpress_print_posts_html
Then you need to return HTML code in your custom coded functions. An example:
add_filter('woocommerce_print_products_product_final_html', 'we_custom_pdf_template', 20, 3);
function we_custom_pdf_template($html, $productId, $data) {
$product = wc_get_product($productId);
if(!$product) {
return;
}
$html = 'My Test';
return $html;
}
2nd option: contact our customization service
Therefore please send us an email to [email protected] including the following information:
- desired template (PDF mockup)
- information where what data is coming from (best you comment that in the PDF template)
- make sure you mark custom data fields / ACF fields correctly
Send your request to [email protected]. Then we can give you a quote.
Questions & answers (12)
PhilipJanuary 16, 2024
In which folder of my theme do I need to place an override template file of the woocommerce-pdf-catalog/class-woocommerce-pdf-catalog-product-templates.php?
carterDecember 28, 2023
Why doesn’t “pos.” automatically sort, it can only display the number 1
KatieAugust 2, 2023
How do I add custom fields to the PDF please?
DanielAugust 2, 2023
Custom fields can be enabled in our plugin settings.
SamueleDecember 13, 2025
Where is this setting located?
SamueleDecember 13, 2025
Where are these settings to be found?
Gardner GOctober 13, 2022
I would like my product display based on the SKU number order. Can pdf catalog able to do that? Or I need to write specific code to achieve that? Thank you
DanielOctober 13, 2022
Well currently not, but we can customize / add this feature for you on Charge. Contact us at [email protected]
YoannOctober 3, 2022
Hey, this hook use the example for woocommerce_print_products_product and not wordpress_print_posts, could you explain how to create a custom template and give the right hook for with wordpress_print_posts ?
Thanks,
DanielOctober 3, 2022
In the FAQ it says you can use “wordpress_print_posts_html” filter. This one is correct.
SIrvinOctober 6, 2022
Thanks for your reply. I don’t manage to add the hook specify above in my function.php. It creates a critical error. I can design my own HTML template but I don’t understand how to connect it with this hook. What is “My test” ? Could you do a step-by-step guide to at least use your hook ?
Is this a special support to ask about clarifying your FAQ ? If yes well i will renew it. Thanks a lot
DanielOctober 6, 2022
For plugin support issues please submit a ticket on our website.