This project is read-only.


Topics: General
Oct 16, 2011 at 4:16 PM


We are interested in creating some pages within Orchard, which can produce PDF (or) html. An use case is, you are looking at an online report in html which one would like to convert to pdf.

In the past we had done this within by implementing an alternate view which would generate xsl:fo which in turn would be used to generate pdf.


With orchard's modular design of widgets, themes. Any ideas on how this could be done within Orchard.



Oct 16, 2011 at 6:36 PM

If you want a generic approach which would add a PDF button on every Orchard page, then you should go with a MVC Filter, which could add it in a specific zone, or a Widget, to let the user decide which zone, even better. If you have specific pages and reports, then I would suggest to use PDF Sharp instead of xsl-fo. For both you will need your own controller to handle the request and convert a content.

Oct 16, 2011 at 6:46 PM

Thanks for the feedback Sebastien.


With regards to using PDF Sharp. We can take the controller approach and use PDF Sharp but it looks like we will loose the ability to utilize razor templates. We were hoping to use the templates based approach and orchard to override templates by theme.


We have to provide the ability by which different users of the website will see different headers and footers. The same functionality needs to extend to the PDF also. We can do this for the html section to override html templates by switching themes but not clear how we would do this for PDF.



Oct 16, 2011 at 6:54 PM

Ok, this sounds great.