<%@ Page Language="VB" %> <% Dim wfrPdf As Object Dim pdfImg As Byte() Try 'PDF Server オブジェクトの作成 wfrPdf = Server.CreateObject("Wfr.PdfServer.3") Try '帳票定義ファイル(*.wfr)のオープンとデータの入力 wfrPdf.Open(Server.MapPath("sample.wfr")) wfrPdf.Import("Data1", 0, Server.MapPath("sample.csv")) 'PDFイメージの取得とクライアントへの出力 pdfImg= wfrPdf.GetPdfImage("PdfUser=test") Response.ContentType="application/pdf" Response.BinaryWrite(pdfImg) Catch ex As Exception 'エラーの出力 Response.Write(ex.Message) End Try 'オブジェクトの破棄 System.Runtime.InteropServices.Marshal.ReleaseComObject(wfrPdf) Catch ex As Exception 'エラーの出力 Response.Write(ex.Message) End Try %> |