I'm using a UDT to generate PDF files dynamically via mPDF. I'm calling my UDT with "showtemplate=false" in the query string but was finding that the generated file was receiving the wrong MIME type in the header so that it was displaying as HTML rather than a PDF.
My question is: what is the right way to set the MIME type in my UDT? A Google search revealed a
blog post referring to
Code: Select all
cmsms()->variables['content-type']
but I can't find any documentation on this.
I used
Code: Select all
cmsms()->variables['content-type'] = "application/pdf";
and it seems to work fine, but is this the correct method?