What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Attach Terms of service as PDF - empty pages BUG

Attach Terms of service as PDF - empty pages BUG

gogogo15
Shopify Partner
5 0 5

When we attach terms of service as PDF to order confirm notification using code below, the pages are rendered blank or the PDF is totally broken so it cannot be opened.

 

Here is the code:

 {{ shop.terms_of_service | attach_as_pdf: "Terms of Service" }}

 

It worked before, now it does not. No matter what store it is or what the terms of service look like.

Replies 4 (4)

adamcharvat
Shopify Partner
10 2 6

This is happening to all my partners' stores, too.

 

It used to attach a weird PDF file containing some empty bullet points but now it attaches a broken PDF file that cannot be opened.

 

I'm also talking to Shopify Support but nothing from them yet. 

gogogo15
Shopify Partner
5 0 5

Shopify support told me that it is not their problem as this piece of code is not there by default. Which I totally disagree, they should repair it.

Shame.

 

I hope you will get more satisfying answer from the support than me 🙂

Languste
Tourist
3 0 1

Facing the same issue. Also in contact with the shopify support for several days. No solution yet.

Only offer was a workaround to change the code for the order conformation to "Attach_as_text" instead of "Attach_as_pdf" -> As a result the policies are added as text to the conformation mail.

 

{{ shop.terms_of_service | Attach_as_text }}

{{ shop.refund_policy | Attach_as_text }}

Languste
Tourist
3 0 1

Got feedback from shopify support and since than the pdf attachement works fine:

 

"Our developers have implemented a solution that will allow the attach_as_pdf liquid filter to properly attach files with content for policy object types. If while we worked on this solution, you had changed your attach_as_pdf filters to attach_as_text filters, they can now be changed back for your policies."