Content Type

Hey Guys just a generic question, has anyone had a play with outputting plain text assets to PDF on the fly? similar concept of applying printer friendly design?


so that a user can select to export to PDF on the fly…



Just wondering if anyone has played around with this :slight_smile:

Hey,


I’ve had a look into http://html2fpdf.sourceforge.net/ which seems to work quite well, but has some major bugs, like <div> in <div> which isn’t supported.



Other tips:



http://html2fpdf.sourceforge.net/ with simplified version at: http://html2fpdf.sourceforge.net/





Well there’s a lot of html2pdf libraries. I think it would be quite messy to get it included in Matrix.

Cheers for the reply dude, yeah I am waare of those libraries, but I guess what I am trying to find out is whether anyone has enabled their users to export/view a current page as PDF file, appklying a different Design to the outoput, and then redering the whole thing in PDF format. If you can understand what I mean?

[quote]Hey,



I’ve had a look into http://html2fpdf.sourceforge.net/ which seems to work quite well, but has some major bugs, like <div> in <div> which isn’t supported.



Other tips:



http://html2fpdf.sourceforge.net/ with simplified version at: http://html2fpdf.sourceforge.net/

Well there’s a lot of html2pdf libraries. I think it would be quite messy to get it included in Matrix.

[right][post=“7609”]<{POST_SNAPBACK}>[/post][/right][/quote]

Hmm… have no site on my mind, but check example nr. 4 the principe is the same… http://html2fpdf.sourceforge.net/examples.php


Just post the url to the page with the specific CSS file applied. And the library creates the PDF on the fly.

As far as we know, no-one has created a "Export to PDF" option for Matrix. We do this a lot internally, and I think the developers have thought about how to do this in Matrix, but no code has actually been written.

Hey there Avi…


well I have got the template working which sets the content header type. Going to have a play around and see if I can incorporate the http://www.fpdf.org/ library to output the body string in PDF format.



I have create a new core package based on the body which I have called PDF, so will have a look at modifying the output and rendering the content to a PDF format. :slight_smile:

Setting the Content Type is pretty simple in v3.6 (we have a Design Area for that). Its the on-the-fly conversion to PDF that's trickier. :slight_smile: