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
SWAMY YT
1.1k
643
30.4k
Generate a PDF programatically
Oct 21 2018 8:10 AM
Hai,
i have a requirement like generate a PDF programatically, and i tried with the code the problem is the code is excecutedcurrectly but the pdf is not getting generated. here is my code
public void GeneratePrint()
{
try {
var document = new Document(PageSize.A4, 50, 50, 25, 25);
var output = new FileStream(Server.MapPath("MyFirstPDF.pdf"), FileMode.Create);
var writer = PdfWriter.GetInstance(document, output);
document.Open();
var welcomeParagraph = new Paragraph("Hello, World!");
document.Add(welcomeParagraph);
document.Close();
}
catch (Exception Ex) {
Console.Write("While Printing Caught an Error");
}
}
Reply
Answers (
2
)
Version greater than 2007 .xlsm file is not working
how get list of data of T variable