Dim wfrPdf As WfrLib.PdfServer 'PDF Serverのオブジェクトを作成 wfrPdf = WfrLib.PdfServer.CreateObject() 'A4縦のページを追加 wfrPdf.AddPage(21000, 29700, "portrait", 1000, 1000) 'スタイルの登録 wfrPdf.AddStyle("STYLE_CAPTION", "ArrangeH=Center;ArrangeV=Center;FontSize=600;FontColor=#FFF;FontBold=TRUE;FillType=solid;FillColor1=#F80;LineType=solid;LineColor=#FFF") wfrPdf.AddStyle("STYLE_DETAILS_TEXT", "ArrangeV=Center;FontSize=600;FontColor=#000;FillType=none;LineType=none") wfrPdf.AddStyle("STYLE_DETAILS_NUMBER", "ArrangeH=Right;ArrangeV=Center;TextFormat='%,#';FontSize=600;FontColor=#000;FillType=none;LineType=none") wfrPdf.AddStyle("STYLE_DETAILS_KINGAKU", "ArrangeH=Right;ArrangeV=Center;TextFormat='%,#円';FontSize=600;FontColor=#000;FillType=none;LineType=none") '見出し(明細のタイトル等) wfrPdf.AddItem("T", 0, 6000, 10000, 7000, "", "FontColor=#F80;ArrangeV=bottom", "以下の通りご請求申し上げます。") wfrPdf.AddItem("T", 0, 7000, 10000, 8000, "STYLE_CAPTION", "", "内容") wfrPdf.AddItem("T", 10000, 7000, 13000, 8000, "STYLE_CAPTION", "", "単価") wfrPdf.AddItem("T", 13000, 7000, 16000, 8000, "STYLE_CAPTION", "", "数量") wfrPdf.AddItem("T", 16000, 7000, 19000, 8000, "STYLE_CAPTION", "", "合計") '明細部の値 wfrPdf.AddItem("T", 0, 8000, 10000, 9000, "STYLE_DETAILS_TEXT", "", "テレビ") wfrPdf.AddItem("T", 10000, 8000, 13000, 9000, "STYLE_DETAILS_KINGAKU", "", "100000") wfrPdf.AddItem("T", 13000, 8000, 16000, 9000, "STYLE_DETAILS_NUMBER", "", "1") wfrPdf.AddItem("T", 16000, 8000, 19000, 9000, "STYLE_DETAILS_KINGAKU", "", "100000") 'PDFへの出力 wfrPdf.PdfOut("c:\out\sample.pdf") 'オブジェクトの破棄 wfrPdf.Dispose() |