TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mahendra Kumar
NA
164
5.4k
How to generate hindi pdf
Jun 22 2018 11:43 PM
How to generate Hindi Pdf by HTMLWorker class with use of itextsharp
Code is..
protected void btnGenerate_Click(object sender, EventArgs e)
{
try
{
Document pdfDoc = new Document(PageSize.A4, 25, 10, 25, 10);
PdfWriter pdfWriter = PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
string strHTML = @"
This is Header
???? ????? ?? ?????
????? ?????? ??????? ??????
:
";
HTMLWorker htmlWorker = new HTMLWorker(pdfDoc);
htmlWorker.Parse(new StringReader(strHTML));
pdfWriter.CloseStream = false;
pdfDoc.Close();
Response.Buffer = true;
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=Test.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Write(pdfDoc);
Response.Flush();
Response.End();
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
Reply
Answers (
0
)
4 Images per row: MVC HTML
Password is in plain text in ASP.Net Page submit.