Пример #1
0
 static void Main()
 {
     // create host for PHP code (Runtime Context):
     using (var ctx = Context.CreateConsole(null))
     {
         var pdf = new FPDF(ctx);
         pdf.AddPage();
         pdf.SetFont("Arial");
         pdf.Cell(40, 10, "Hello World!");
         pdf.Output("F", "tuto1.pdf");
     }
 }
Пример #2
0
        static void Main()
        {
            // sideload assembly containing compiled PHP code:
            Context.AddScriptReference(Assembly.Load(new AssemblyName("fpdf")));

            // create host for PHP code (Runtime Context):
            using (var ctx = Context.CreateConsole(null))
            {
                var pdf = new FPDF(ctx);
                pdf.AddPage();
                pdf.SetFont("Arial");
                pdf.Cell(40, 10, "Hello World!");
                pdf.Output("F", "tuto1.pdf");
            }
        }