Exemplo n.º 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;
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
            }
        }