I'm using iTextSharp Library to build PDFs. I'm trying to develop an application for certification (auto generator). and every time I'm getting an error
"The Document has no pages"
as exception. here i build a PDF document
using (Document pdoc = new Document(PageSize.A4.Rotate(), 2, 2, 10, 10))
and saw some similar questions and the solution was there that the developer do not add next at all to the document.
here i add some text to the document and still getting that exception.
pdoc.Add(EnglishTable);
pdoc.Add(HebrewTable);
pdoc.Add(ArabicTable);
i build the tables in this way
PdfPTable HebrewTable = new PdfPTable(1);
PdfPTable ArabicTable = new PdfPTable(1);
PdfPTable EnglishTable = new PdfPTable(1);
setting the Direction
HebrewTable.RunDirection = PdfWriter.RUN_DIRECTION_RTL;
ArabicTable.RunDirection = PdfWriter.RUN_DIRECTION_RTL;
EnglishTable.RunDirection = PdfWriter.RUN_DIRECTION_LTR;
and i take some text from excel file and add it to the tables. and still getting that error.