Empty pdf: shop.terms_of_service | attach_as_pdf: “Terms of Service”

We’ve added {{shop.terms_of_service | attach_as_pdf: “Terms of Service”}} to the bottom of the order confirmation, which used to add the Terms of Service as a pdf, shopify still attach a file, but now the file is empty or blank and without a name.

Anyone know why that is?

If you’re experiencing issues with attaching the Terms of Service as a PDF to the order confirmation in Shopify, there are a few things you can check:

  1. Check the file format: Ensure that the Terms of Service document you are trying to attach is in PDF format. Shopify only supports attaching PDF files using the attach_as_pdf filter.

  2. Verify the file content: Make sure that the Terms of Service PDF file itself contains the expected content. Open the file separately to confirm that it is not blank or empty.

  3. Review Liquid code: Double-check the Liquid code you added to the order confirmation template. Ensure that the attach_as_pdf filter is being used correctly, and the correct file path or URL to the Terms of Service PDF is specified.

Thank you for your input.

shop.terms_of_service is the core shopify terms of service page, the page is showing correctly, and used to add correctly. So format is valid.

And if Liquid code is not correct, then why is an unnamed pdf file added, there would be no file at all if the code is wrong?