Reports.Web 1.0.0

dotnet add package Reports.Web --version 1.0.0
                    
NuGet\Install-Package Reports.Web -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Reports.Web" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Reports.Web" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Reports.Web" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Reports.Web --version 1.0.0
                    
#r "nuget: Reports.Web, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Reports.Web@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Reports.Web&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Reports.Web&version=1.0.0
                    
Install as a Cake Tool

Reports.Web

Reports.Web for .NET (C#) — 帳票定義(.prepdj)に値を入れて印刷データ(PREPEJ)を作り、Reports.Web エンジン(C++ WebAssembly)で PDF にします。請求書・見積書・納品書・宛名ラベル・名刺など、日本の業務帳票向けです。

Build print data (PREPEJ) from a report definition (.prepdj) and render it to PDF with the Reports.Web engine (C++ WebAssembly). Designed for Japanese business forms: invoices, estimates, delivery slips, address labels, business cards.

しくみ / How it works

your .NET app ──(PREPEJ JSON)──▶ Reports.Web engine (Docker: ghcr.io/reportsweb/engine) ──▶ PDF
      ▲
 report definition (.prepdj) designed in the browser designer

帳票のデザインは、ブラウザで動くデザイナーで作ります。アプリは値を入れて印刷データを作り、エンジンに送るだけです。描画はすべてエンジンが行います。

インストール / Install

dotnet add package Reports.Web
docker run -d -p 3107:3107 ghcr.io/reportsweb/engine:1.0.0

.NET 8 以降。エンジンは Docker イメージで動きます。 Requires .NET 8 or later. The engine runs as a Docker image.

使い方 / Quick start

using System.Text.Json.Nodes;
using Pao.Reports.Web;

var definition = JsonNode.Parse(File.ReadAllText("quick-report.prepdj"))!.AsObject();

var printData = new PrintData()
    .SetDefinition(definition)
    .PageStart()
    .SetValue("Title", "C#/.NETから、あっという間に帳票出力")
    .SetValue("CustomerName", "株式会社パオ")
    .PageEnd();

using var engine = new ReportsWebEngine("http://127.0.0.1:3107");
File.WriteAllBytes("report.pdf", await engine.RenderPdfAsync(printData));

API

PrintData

メソッド / Method 内容 / Description
SetDefinition(definition) 帳票定義(.prepdj の内容)を設定 / Set the report definition
PageStart(definition?) / PageEnd() ページの開始と終了。ページごとに別の定義も使えます / Begin and end a page
SetValue(name, value, index, drawing) 文字などの値を入れる / Set a value
SetRepeatedValue(name, value, x, y) 繰り返し(明細行など)の値 / Value for a repeated object
SetImage(name, source) / SetBarcode(name, code) 画像・バーコード / Image and barcode
ChangeAttributes(name, values) 色・位置などの属性を変える / Change attributes
ToJsonObject() / ToJson() / Save(path) 印刷データ(PREPEJ)として取り出す・保存する / Get or save the PREPEJ

ReportsWebEngine

メソッド / Method 内容 / Description
new ReportsWebEngine(url, httpClient, timeout, maxBytes) 既定の URL は REPORTS_ENGINE_URL、なければ http://127.0.0.1:3107
RenderPdfAsync(printData) PDF の byte[] を返します / Returns the PDF bytes
HealthAsync() エンジンの状態 / Engine status

エラーは ReportsWebEngineException(StatusCode に HTTP ステータス)で返ります。 Errors are thrown as ReportsWebEngineException with the HTTP StatusCode.

体験版と製品版 / Trial and product

このパッケージとエンジンのイメージは体験版です。出力には赤い「SAMPLE」の印が付きます。ご購入後に納品するライセンスファイルをエンジンに設定すると、印が消えます。

The package and the engine image are trial builds: output carries a red "SAMPLE" mark. Mount the license file delivered on purchase to remove it:

docker run -d -p 3107:3107 -v /path/to/reports-web.license:/app/reports-web.license:ro ghcr.io/reportsweb/engine:1.0.0

開発用パソコン 1 台につき 1 ライセンス、運用環境はランタイムライセンスフリーです。詳しくは LICENSE.md と 使用許諾 をご覧ください。

他の言語 / Other languages

Reports.Web は同じ帳票定義と印刷データを、PHP・Java・.NET・Go・Ruby・Rust・Node.js から使えます。Pure Java・WPF 版もあります。 https://github.com/ReportsWeb


Pao@Office — https://www.pao.ac/ — info@pao.ac

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 54 10/2/2026

1.0.0: first release with Reports.Web 1.0.0.