Create pdf documents within an asp .net mvc project by generating your views as normal but returning a PdfActionResult. This converts regular produced razor/html to pdf documents in the browser using the iTextXmlWorker.
Thanks for creating this great library that we've been using for our project now. I am having one really annoying issue and I seem to not be able to find any answers online.
I have a model (that's being returned by a controller). This model has an image of type byte[]. My view is also being returned as a PdfActionResult from my controller and this image is part of the model that get's passed on to the view. When I was rendering this image as HTML it was working just fine but as soon I converted it to create a PDF output it keeps giving me exception(s). The exception message is this for now - "The document has no pages." but I am certain that the reason is something else and I don't know what that is because when I remove the image from the view, everything else gets rendered on the PDF just right.
Hi there -
Thanks for creating this great library that we've been using for our project now. I am having one really annoying issue and I seem to not be able to find any answers online.
I have a model (that's being returned by a controller). This model has an image of type byte[]. My view is also being returned as a PdfActionResult from my controller and this image is part of the model that get's passed on to the view. When I was rendering this image as HTML it was working just fine but as soon I converted it to create a PDF output it keeps giving me exception(s). The exception message is this for now - "The document has no pages." but I am certain that the reason is something else and I don't know what that is because when I remove the image from the view, everything else gets rendered on the PDF just right.
K