示例#1
0
 public static FPdf GetSample(string path)
 {
     var pdf = new Sample3 {LocalPath = path};
     pdf.AliasNbPages()
        .SetTitle("20000 Leagues Under the Seas")
        .SetAuthor("Jules Verne");
     pdf.PrintChapter(1, "A RUNAWAY REEF", "20k_c1.txt");
     pdf.PrintChapter(2, "THE PROS AND CONS", "20k_c2.txt");
     return pdf;
 }
示例#2
0
        public static FPdf GetSample(string path)
        {
            var pdf = new Sample3 {
                LocalPath = path
            };

            pdf.AliasNbPages()
            .SetTitle("20000 Leagues Under the Seas")
            .SetAuthor("Jules Verne");
            pdf.PrintChapter(1, "A RUNAWAY REEF", "20k_c1.txt");
            pdf.PrintChapter(2, "THE PROS AND CONS", "20k_c2.txt");
            return(pdf);
        }
示例#3
0
 public static Stream GetSample(string file, string path)
 {
     using (var pdf = new Sample3(null)
     {
         LocalPath = path
     })
     {
         pdf.AliasNbPages()
         .SetTitle("20000 Leagues Under the Seas")
         .SetAuthor("Jules Verne");
         pdf.PrintChapter(1, "A RUNAWAY REEF", "20k_c1.txt");
         pdf.PrintChapter(2, "THE PROS AND CONS", "20k_c2.txt");
         pdf.Close();
         return(pdf.Buffer.BaseStream);
     }
 }