Discussion:
[iText-questions] .NET C# MVC VIEW to PDF using iTextSharp
R Balbo
2016-01-05 17:46:13 UTC
Permalink
Hello,

I am hoping you can help me. I am looking into how to create a PDF file
from a MVC View (formatted as a report - object is model or model.tolist),
*without* first saving it to the server disk , i.e. instead just save it in
memory and displaying it for the user for viewing or saving to their local
disk if so desired.

I would greatly appreciate if you can send some samples my way.

Thanks,
RB
Kostas
2016-01-07 06:47:20 UTC
Permalink
Hi.



Creating a PDF in memory:

http://stackoverflow.com/questions/2815761/create-pdf-in-memory-instead-of-physical-file



To serve it in the browser you can return it as a file from an MVC controller action that gets called/requested from an <iframe>, but you must assume the user’s browser can display the PDF.



I hope this helps,

KK





From: R Balbo [mailto:***@gmail.com]
Sent: Tuesday, January 05, 2016 7:46 PM
To: itext-***@lists.sourceforge.net
Subject: [iText-questions] .NET C# MVC VIEW to PDF using iTextSharp



Hello,

I am hoping you can help me. I am looking into how to create a PDF file from a MVC View (formatted as a report - object is model or model.tolist), without first saving it to the server disk , i.e. instead just save it in memory and displaying it for the user for viewing or saving to their local disk if so desired.

I would greatly appreciate if you can send some samples my way.

Thanks,

RB

Loading...