Rotativa, ABCPdf and EO.Pdf do not work in Azure WEBSITES, and I do not want to upgrade to Azure "Cloudapp",

Given the events (take them as a fact):

1) Rotativa PDF ( https://github.com/webgio/Rotativa ) uses exe to create PDF files, so it does not work on azure sites (without permission to execute this 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 do not want to have Azure Cloudapp (which will allow me to use Rotativa or ABCPdf). I am fine with my Azure site (apart from the previous issues).

Is there an alternative solution?
Is there any other library for creating PDF files from HTML that can run on the Azure website (rather than CloudService or VM)?




Update November 2014:
Today I use MvcRazorToPdf , which is great.

Controller 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/ 
+8
pdf-generation abcpdf wkhtmltopdf azure rotativa
source share
2 answers

You can use iTextSharp ( http://sourceforge.net/projects/itextsharp/ ). Used it very successfully in the past. It is currently available as a nuget package - https://www.nuget.org/packages/itextsharp/ .

+1
source share

Is this task suitable for WAWS?

Windows Azure Websites is a great platform for applications that don't consume a lot of processing time. But WAWS may not be the best option for working with an intensive processor, for example, for converting a web page to PDF. Downloading and rendering web pages can take several seconds, while creating a PDF, it consumes a few more. And if you are unsuccessful enough to defeat one or two (as it has ever been), any quota on your WAWS account could evaporate instantly. What happens to the site when the cap is exceeded?

As far as I understand, free and general levels of WAWS are subject to processing. I'm not sure if this affects the standard level. Is anyone

If converting a web page to PDF is a must for your WAWS website, I would suggest using it in conjunction with the worker role or just using the web role (cloud services). An added benefit is that you can connect multiple WAWS sites to a single work role, which can help reduce licensing costs and save time on site deployment and maintenance.

0
source share

All Articles