Quote from: BobRay at Jun 04, 2014, 04:07 PMWhen you set the content type to PDF, MODX delivers the content as a PDF file, which your browser tries to display as a PDF. It doesn't work because it's not really a PDF file.
Can you give a little more detail on what you're trying to accomplish?
I can try ;-)
Thanks for the response. I am using TCPDF to produce a PDF from some (ultimately) dynamically generated HTML.
I looked at HTMLtoPDF in the MODX add ons, but it seemed a bit more complicated than I thought I needed, and was based on an older version of TCPDF.
When I run the php file (outside of MODX) to generate the PDF from some HTML, all is golden.
If I reference that external php file as the href in an anchor tag, all is golden.
When I try to do it through a snippet call, and set the content type to HTML, I get the PDF binary (altered to HTML text).
When I try to do it through a snippet call, and set the content type to PDF, no snippet call is made.
Seems like there should be a way to get actual PDF output from a snippet call, but I haven't seen how to get MODX to parse my snippet for other than an HTML content type.
Am I crazy?
Thanks again.