private void generatePDF() { PDFcreator newPdf = new PDFcreator(); newPdf.createTitle("Votes Statistics"); newPdf.addCandidateVotes(CandidateVotes, "Distribution of votes for individual candidates"); newPdf.AddParagraph("Invalid votes", InvalidVotes.ToString()); newPdf.AddParagraph("Valid votes", ValidVotes.ToString()); newPdf.newPage(); newPdf.addVotesStatistic(PartyVotes, "Distribution of votes for particular party"); newPdf.SavePdf(); }