Given the circunstances (take them as a fact):
1) Rotativa PDF (https://github.com/webgio/Rotativa) uses an exe for creating PDFs, so it doesn't work on azure websites (no permission to execute that exe)
2) ABCPdf has the same problem
3) EO.Pdf has a similar problem ("uses Windows GDI but Windows GDI is not supported by Windows Azure WebSite", http://www.essentialobjects.com/doc/4/install/deploy.aspx)
4) I don't want to have an Azure Cloudapp (which would allow to me to use Rotativa or ABCPdf). I'm fine with my Azure Website (except for the previous problems).
Is there an alternative solution?
Is there any other library for creating PDFs from HTML that can run on an Azure Website (not CloudService nor VM)?
Update nov-2014:
I'm today using MvcRazorToPdf, it is great.
Controller's code:
return new PdfActionResult(palletReception, (writer, document) =>
{
document.SetPageSize(new Rectangle(792f, 612f));
document.NewPage();
})
{
FileDownloadName = "foo.pdf"
};
View code:
A normal view with normal css. Must be accepted by iText XMLWorker Check this: http://demo.itextsupport.com/xmlworker/itextdoc/flatsite.html and this: http://demo.itextsupport.com/xmlworker/
You could leverage iTextSharp (http://sourceforge.net/projects/itextsharp/). Have used it very successfully in the past. It's even available as a nuget package these days - https://www.nuget.org/packages/itextsharp/.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With