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
Vikas Rao
NA
69
3.6k
How can i Add Font size in pdf.
Jan 9 2020 5:18 AM
public ActionResult DownloadProductCartProposalPDF()
{
try
{
var cartProposalText = System.IO.File.ReadAllText("E:/Skype/ProposalContractInvoice_old.html");
Byte[] bytes;
StringReader sr = new StringReader(cartProposalText.ToString());
//Document pdfDoc = new Document(PageSize.A4.Rotate(), 0, 0, 15, 5);
Document pdfDoc = new Document();
pdfDoc.SetPageSize(iTextSharp.text.PageSize.LEGAL_LANDSCAPE.Rotate());
pdfDoc.SetMargins(5, 5, 20, 10);
Font NormalFont = FontFactory.GetFont("Arial", 8, Font.NORMAL);
pdfDoc.Add(NormalFont);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
using (MemoryStream memoryStream = new MemoryStream())
{
PdfWriter writer = PdfWriter.GetInstance(pdfDoc, memoryStream);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
bytes = memoryStream.ToArray();
memoryStream.Close();
}
return File(bytes, "application/pdf", "ProductContract.pdf");
}
catch (Exception ex)
{
return Redirect("/Content/inPersonConferences");
}
}
Reply
Answers (
5
)
I have a web application in which i play sound speechsynthes
Preview the word/PDF Doc & Searching the Skills