How to Build a Custom PDF Template Using Liquid for Shopify - Blank Template with metafields

If you're building a custom PDF for a client who owns a Shopify store

Customer Success

Last Update 5 dagen geleden

Step 1: Capture Your Style Block

Start by capturing your custom styles using capture. These will control layout, padding, and table formatting.

Step 2: Build the Header

Next, define your header. You can include your client’s logo and even dynamic content like a QR code placeholder.

Step 3: Create the Body Content

Here’s where you can pull in dynamic product metafields like dimensions or materials. You can also include a product spec table or any custom layout your client requires.

Step 4: Add a Footer

This might include basic contact info or any legal footnotes.

Step 5: Assemble Your customObject

Finally, combine everything into a single JSON object. This is the key output you’ll pass to your PDF rendering logic.

Step 6: Update template in App

Don't forget to set the template setting as "Blank Template" and hit "Save". This will use the payload you built in the App block.

Done!

You now have a complete Liquid-based JSON template that you can send to a PDF engine. This method keeps your HTML structured, dynamic, and easy to update—all while giving your Shopify client a custom-branded PDF output.

Was this article helpful?

0 out of 0 liked this article

Still need help? Message Us