<%@ Page Language="VBScript" %> <% Dim wfrPdf As Object Dim pdfImage As Byte() 'PDF Server オブジェクトの作成 wfrPdf = Server.CreateObject("Wfr.PdfServer.3") 'テンプレートファイルの読み込み(固定部のみ) wfrPdf.LoadTemplate(Server.MapPath("template.txt")) '宛名等 wfrPdf.AddItem("T", 1300, 0, 19000, 800, "", "ArrangeH=Right;FontSize=600;FontUnder=Under1;TextFormat='No. %@'", "1234567") wfrPdf.AddItem("T", 200, 3000, 13000, 4200, "", "FontSize=1000;FontUnder=Under1;TextFormat='%@ <S:70>様</S>';TextOption=Tag", "あいうえお株式会社") '明細部の値(1明細分です。実際には明細の数だけ準備する必要があります) 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") '合計の値 wfrPdf.AddItem("T", 16000, 24000, 19000, 25000, "STYLE_DETAILS_KINGAKU", "", "100000") wfrPdf.AddItem("T", 16000, 25000, 19000, 26000, "STYLE_DETAILS_KINGAKU", "", "8000") wfrPdf.AddItem("T", 16000, 26000, 19000, 27000, "STYLE_DETAILS_KINGAKU", "FontBold=true", "108000") 'PDFイメージの取得とクライアントへの出力 pdfImage= wfrPdf.GetPdfImage("PdfUser=test") Response.ContentType="application/pdf" Response.BinaryWrite(pdfImage) 'オブジェクトの破棄 System.Runtime.InteropServices.Marshal.ReleaseComObject(wfrPdf) %> |