tl;dr : Basically I'm just wondering what is the best/easiest way to design a PDF document? Is it remotely legit to actually design a whole PDF document with iTextSharp with code(i.e not loading external files)? I want the final result to look similar to a webpage with various colours, borders, images and everything. Or do you have to rely on other documents like .doc, .html files to achieve a good design?
Originally I thought that I would use HTML markup to generate a PDF, however seeing how bad the support seems to be when it comes to styling/CSS so am I rethinking the whole situation.
Which led me to think, why even use a HTML markup or a .doc(x) file to create the PDF design when I could just do it right within the PDF without having to rely on on various files that serves no real purpose.
I started looking on this guide(it is several parts) http://www.c-sharpcorner.com/uploadfile/f2e803/basic-pdf-creation-using-itextsharp-part-i/
A part of the guide :
using (MemoryStream ms = new MemoryStream())
{
Document document = new Document(PageSize.A4, 25, 25, 30, 30);
PdfWriter writer = PdfWriter.GetInstance(document, ms);
document.Open();
document.Add(new Paragraph("Hello World"));
document.Close();
writer.Close();
Response.ContentType = "pdf/application";
Response.AddHeader("content-disposition",
"attachment;filename=First PDF document.pdf");
Response.OutputStream.Write(ms.GetBuffer(), 0, ms.GetBuffer().Length);
}
And got a basic hang about generating PDFs and design them a bit.
But is it possible to generate and design big PDF documents this way and are there any more proper guides or similar with all the various commands to generate texts, images, borders and everything since I have no real clue about generating PDF with code.