예제 #1
0
        public static void Main()
        {
            //Initialize document object and document builder object


            //Create company contact info
            CompanyContactInfoBuilder.Build();

            //Create bill summary table inside a text box
            BillSummaryTableBuilder.Build();

            //Create bill details table using Document Builder
            BillDetailsTableBuilder.Build();

            //Create perforated line for payment stub
            PaymentStubPerforatedLineBuilder.Build();

            //Create payment stub
            PaymentStubBuilder.Build();

            //Set global page margins
            GlobalDocumentSettings.SetPageMargins();

            //Save document
        }
        public static void Main()
        {
            //Initialize document object and document builder object
            var doc     = new Document();
            var builder = new DocumentBuilder(doc);

            builder.Font.Name = GlobalDocumentSettings.FontName;
            builder.Font.Size = GlobalDocumentSettings.FontSize;

            //New add company logo to the company address
            CompanyLogoBuilder.Build(builder);

            //New add company logo to the company address
            CompanyLogoBuilder.Build(builder);

            //Create watermark
            WatermarkBuilder.Build(builder);

            //Create bill Summary table inside a text Box
            BillSummaryTableBuilder.Build(doc, builder);

            //Create bill details table using Document Builder
            BillDetailsTableBuilder.Build(builder);

            //Create column chart
            HistoricalUsageChartBuild.Build(builder);

            //Create perforated line for payment stub
            PaymentStubPerforatedLineBuilder.Build(builder);

            //Create payment stub
            PaymentStubBuilder.Build(builder);

            //Create Add QR code to pay stub
            QrCodeBuilder.Build(builder);

            //Append bill payment instructions page
            var billPayInstructions = new Document(GlobalDocumentSettings.PaymentInstruccionsFileName);

            doc.AppendDocument(billPayInstructions, ImportFormatMode.KeepSourceFormatting);

            //Set Global page margins
            GlobalDocumentSettings.SetPageMargins(doc);

            //Save Document
            doc.Save(GlobalDocumentSettings.FileName);
        }