{"id":10339,"date":"2021-12-30T21:19:26","date_gmt":"2021-12-30T20:19:26","guid":{"rendered":"https:\/\/www.welaunch.io\/en\/my-tickets\/ticket\/are-custom-layouts-possible\/"},"modified":"2023-06-07T08:03:03","modified_gmt":"2023-06-07T06:03:03","slug":"are-custom-layouts-possible","status":"publish","type":"faq","link":"https:\/\/www.welaunch.io\/en\/knowledge-base\/faq\/are-custom-layouts-possible\/","title":{"rendered":"Are custom PDF layouts possible?"},"content":{"rendered":"
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.<\/p>\n
Print products PDF<\/strong><\/p>\n Therefore you can use one of the two filters:<\/p>\n Print Posts Plugin<\/strong><\/p>\n Then you need to return HTML code in your custom coded functions. An example:<\/p>\n Therefore please send us an email to su*****<\/span>@******<\/span>ch.io<\/span> including the following information:<\/p>\n\n
\n
add_filter('woocommerce_print_products_product_final_html', 'we_custom_pdf_template', 20, 3);\nfunction we_custom_pdf_template($html, $productId, $data) {\n\t$product = wc_get_product($productId);\n\tif(!$product) {\n\t\treturn;\n\t}\n\n\t$html = 'My Test';\n\n\treturn $html;\n}\n<\/pre>\n2nd option: contact our customization service<\/strong><\/h2>\n
\n