Beispiel #1
0
        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;
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
            }
        }