Click here to Skip to main content
15,891,721 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi
I have created a pdf file using ItextSharp in pdf. it created pdf file. I need to show the pdf file once it created.


Please suggest me

Thanks in advance.
Posted

1 solution

Once the pdf file is created you can render the file as following.

Byte[] buffer = [PDF Content data in bytes]

if (buffer != null)
{
Response.ContentType = "application/pdf";
Response.AddHeader("content-length", buffer.Length.ToString());
Response.BinaryWrite(buffer);
}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900