<%@ Page Language="VB" %>
<%
    Dim wfrPdf As WfrLib.PdfServer
    Dim pdfImg As Byte()

    'PDF Serverのオブジェクトを作成
    wfrPdf = WfrLib.PdfServer.CreateObject("localhost")

    '帳票定義ファイル(*.wfr)のオープンとデータの入力
    wfrPdf.Open(Server.MapPath("sample.wfr"))
    wfrPdf.Import("Data1", 0, Server.MapPath("sample.csv"))

    'PDFイメージの取得とクライアントへの出力
    pdfImg = wfrPdf.GetPdfImage()
    Response.ContentType = "application/pdf"
    Response.BinaryWrite(pdfImg)

    '破棄
    wfrPdf.Dispose()
%>