public static FPdf GetSample(string path) { var pdf = new Sample5(); string[] header = { "Country", "Capital", "Area (sq km)", "Pop. (thousands)" }; pdf.LocalPath = path; pdf.LoadData("countries.txt"); pdf.SetFont("Arial", string.Empty, 14); pdf.AddPage(); pdf.BasicTable(header); pdf.AddPage(); pdf.ImprovedTable(header); pdf.AddPage(); pdf.FancyTable(header); return pdf; }
public static FPdf GetSample(string path) { var pdf = new Sample5(); string[] header = { "Country", "Capital", "Area (sq km)", "Pop. (thousands)" }; pdf.LocalPath = path; pdf.LoadData("countries.txt"); pdf.SetFont("Arial", string.Empty, 14); pdf.AddPage(); pdf.BasicTable(header); pdf.AddPage(); pdf.ImprovedTable(header); pdf.AddPage(); pdf.FancyTable(header); return(pdf); }
public static Stream GetSample(string file, string path) { using (var pdf = new Sample5(file)) { string[] header = { "Country", "Capital", "Area (sq km)", "Pop. (thousands)" }; pdf.LocalPath = path; pdf.LoadData("countries.txt"); pdf.SetFont("Arial", string.Empty, 14); pdf.AddPage(); pdf.BasicTable(header); pdf.AddPage(); pdf.ImprovedTable(header); pdf.AddPage(); pdf.FancyTable(header); pdf.Close(); return(pdf.Buffer.BaseStream); } }