フッターコンテンツにスキップ
移行ガイド

C#でFastReportからIronPDFに移行する方法

FastReport.NETは、.NETエコシステムのために構築された強力なレポートソリューションで、複雑なデータ駆動型レポートを作成するためのビジュアルレポートデザイナーとバンドベースのアーキテクチャを特徴としています。 しかし、FastReportは、コードファースト開発を制限するレポートデザイナーの依存性、バンドベースの概念(DataBand、PageHeaderBand)についての急な学習曲線、独自の書式を使用する限られたCSSサポート、RegisterData()ボイラープレートによる複雑なデータバインディング、複数のインストールを必要とする断片化されたNuGetパッケージなど、最新のPDF生成ワークフローにとって重要な課題を提示しています。 この包括的なガイドでは、FastReportからIronPDFへのステップバイステップの移行パスを提供します。IronPDFは、柔軟でプログラム的なドキュメント生成のためにHTML/CSSウェブ技術を活用する汎用PDFライブラリです。

なぜFastReportからIronPDFに移行するのですか?

FastReport.NETのレポーティングへの特化は、多用途のPDF生成を必要とする開発チームに摩擦を生じさせます。 これらのアーキテクチャの違いを理解することは、移行を計画する上で不可欠です。

FastReportの課題

1.レポート デザイナーの依存性:複雑なレイアウトを作成するには、ビジュアル デザイナーまたは .frx ファイル構造に関する深い知識が必要であり、コードファースト開発アプローチには適していません。

2.学習曲線が急:FastReportのバンドベースのアーキテクチャ (DataBand、PageHeaderBand、PageFooterBand) では、他のテクノロジには適用できないレポート固有の概念を理解する必要があります。

  1. CSS サポートが制限されている: Web 標準のスタイルはネイティブではサポートされていません。 スタイリングは、使い慣れたCSSではなく、FastReport独自のフォーマットで行います。

4.複雑なデータ バインディング: RegisterData() および DataSource 接続により、単純な PDF 生成シナリオ用の定型句が追加されます。

5.断片化されたパッケージ:完全な機能を利用するには複数のNuGetパッケージが必要です (FastReport.OpenSource、FastReport.OpenSource.Export.PdfSimple など)。

6.ライセンスの複雑さ:オープンソース バージョンでは機能が制限されます。 PDF暗号化、デジタル署名、フォント埋め込みには商用版が必要です。

アーキテクチャの比較

アスペクト FastReport IronPDF
デザインアプローチ ビジュアルデザイナー + .frx ファイル HTML/CSS(ウェブ技術)
ラーニングカーブ スティープ(バンドベースのコンセプト) ジェントル(HTML/CSSの知識)
データバインディング RegisterData(), DataBand 文字列補間、Razor、テンプレート化
CSSサポート 制限的 フルCSS3とFlexbox/Grid
パッケージモデル 複数のパッケージ 単一パッケージ(全機能)
レンダリングエンジン カスタム 最新のChromium
PDF操作 輸出向け フル(マージ、分割、セキュリティ、フォーム)
モダン.NET .NET Standard 2.0 .NET 6/7/8/9+ ネイティブ

主な移行のメリット

  1. Webテクノロジー:独自のバンドベースのレイアウトではなく、使い慣れたHTML/CSSを使用する 2.コードファースト開発:ビジュアルデザイナーに依存せずにプログラムでPDFを生成する 3.単一パッケージ: 1つのNuGetパッケージにすべてのPDF機能が含まれています 4.モダンレンダリング:ピクセルパーフェクトなCSS3出力を実現する最新のChromiumエンジン
  2. PDFの完全な操作:エクスポートだけでなく、結合、分割、セキュリティ、フォームなど

移行前の準備

前提条件

あなたの環境がこれらの要件を満たしていることを確認してください:

  • .NET Framework 4.6.2+または.NET Core 3.1 / .NET 5-9
  • Visual Studio 2019+またはC#拡張機能付きVS Code
  • NuGetパッケージマネージャへのアクセス
  • IronPDFライセンスキー (ironpdf.com にて無料トライアル可能)

FastReportの使用法を監査する

ソリューションディレクトリでこれらのコマンドを実行し、すべてのFastReport参照を識別します:

# Find allFastReportreferences
grep -r "FastReport\|\.frx\|PDFExport\|PDFSimpleExport\|DataBand\|RegisterData" --include="*.cs" --include="*.csproj" .

# Check NuGet packages
dotnet list package | grep FastReport
# Find allFastReportreferences
grep -r "FastReport\|\.frx\|PDFExport\|PDFSimpleExport\|DataBand\|RegisterData" --include="*.cs" --include="*.csproj" .

# Check NuGet packages
dotnet list package | grep FastReport
SHELL

レポートテンプレートの文書化

移行前に、すべての .frx ファイルとその目的をカタログ化します。

  • レポート名と目的
  • 使用データソース
  • ヘッダー/フッターの設定
  • ページ番号の要件
  • 特殊なフォーマットやスタイル

パラダイムシフトを理解する

FastReportからIronPDFへの移行で最も大きな変更は、基本的な設計アプローチです。FastReportは、.frx テンプレート ファイルと、DataBand、PageHeaderBand、RegisterData() などの独自の概念を使用したバンドベースのビジュアル デザインを使用します。 IronPdfはほとんどの開発者がすでに知っているHTML/CSS-ウェブ技術を使用しています。

これは、FastReportバンド構成をHTMLテンプレートに変換すること、RegisterData()を文字列補間またはRazorテンプレートを介した直接データバインディングに置き換えること、PageHeaderBand/PageFooterBandをHTMLベースのヘッダーとフッターに変換することを意味します。

ステップごとの移行プロセス

ステップ 1: NuGet パッケージを更新する

すべてのFastReportパッケージを削除し、IronPdfをインストールしてください:

# Remove allFastReportpackages
dotnet remove package FastReport.OpenSource
dotnet remove package FastReport.OpenSource.Export.PdfSimple
dotnet remove package FastReport.OpenSource.Web
dotnet remove package FastReport.OpenSource.Data.MsSql

# InstallIronPDF(includes all features)
dotnet add package IronPdf
# Remove allFastReportpackages
dotnet remove package FastReport.OpenSource
dotnet remove package FastReport.OpenSource.Export.PdfSimple
dotnet remove package FastReport.OpenSource.Web
dotnet remove package FastReport.OpenSource.Data.MsSql

# InstallIronPDF(includes all features)
dotnet add package IronPdf
SHELL

ステップ 2: 名前空間参照の更新

FastReportの名前空間をIronPDFに置き換えてください:

// Remove these
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;

// Add this
using IronPdf;
// Remove these
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;

// Add this
using IronPdf;
Imports IronPdf
$vbLabelText   $csharpLabel

ステップ 3: ライセンスの設定

// Add at application startup (Program.cs or Startup.cs)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
// Add at application startup (Program.cs or Startup.cs)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
' Add at application startup (Program.vb or Startup.vb)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"
$vbLabelText   $csharpLabel

完全な API 移行のリファレンス

コア クラス マッピング

FastReport クラス IronPDF 同等物
Report ChromePdfRenderer
PDFExport ChromePdfRenderer + SecuritySettings
PDFSimpleExport ChromePdfRenderer
ReportPage HTML <body> または <div>
TextObject HTML <div>
HTMLObject 直接HTMLレンダリング
PageHeaderBand HtmlHeaderFooter
PageFooterBand HtmlHeaderFooter

メソッドマッピング

FastReport メソッド IronPDF 同等物
report.Load("template.frx") HTMLテンプレートファイルまたは文字列
report.RegisterData(data, "name") 文字列補間またはRazor
report.Prepare() 該当なし
report.Export(export, stream) pdf.SaveAs(path)

ページ番号プレースホルダーの変換

FastReportとIronPDFはページ番号に異なるプレースホルダー構文を使用します:

FastReport IronPDF
[Page] {page}
[TotalPages] {total-pages}

コード移行の例

HTMLからPDFへの変換

この例はFastReportのHTMLObjectアプローチとIronPdfのダイレクトレンダリングの基本的な違いを示しています。

FastReportの実装:

// NuGet: Install-Package FastReport.OpenSource
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;

class Program
{
    static void Main()
    {
        using (Report report = new Report())
        {
            // Create HTML object
            FastReport.HTMLObject htmlObject = new FastReport.HTMLObject();
            htmlObject.Width = 500;
            htmlObject.Height = 300;
            htmlObject.Text = "<html><body><h1>Hello World</h1><p>This is a test PDF</p></body></html>";

            // Prepare report
            report.Prepare();

            // Export to PDF
            PDFSimpleExport pdfExport = new PDFSimpleExport();
            using (FileStream fs = new FileStream("output.pdf", FileMode.Create))
            {
                report.Export(pdfExport, fs);
            }
        }
    }
}
// NuGet: Install-Package FastReport.OpenSource
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;

class Program
{
    static void Main()
    {
        using (Report report = new Report())
        {
            // Create HTML object
            FastReport.HTMLObject htmlObject = new FastReport.HTMLObject();
            htmlObject.Width = 500;
            htmlObject.Height = 300;
            htmlObject.Text = "<html><body><h1>Hello World</h1><p>This is a test PDF</p></body></html>";

            // Prepare report
            report.Prepare();

            // Export to PDF
            PDFSimpleExport pdfExport = new PDFSimpleExport();
            using (FileStream fs = new FileStream("output.pdf", FileMode.Create))
            {
                report.Export(pdfExport, fs);
            }
        }
    }
}
Imports FastReport
Imports FastReport.Export.PdfSimple
Imports System.IO

Class Program
    Shared Sub Main()
        Using report As New Report()
            ' Create HTML object
            Dim htmlObject As New FastReport.HTMLObject()
            htmlObject.Width = 500
            htmlObject.Height = 300
            htmlObject.Text = "<html><body><h1>Hello World</h1><p>This is a test PDF</p></body></html>"

            ' Prepare report
            report.Prepare()

            ' Export to PDF
            Dim pdfExport As New PDFSimpleExport()
            Using fs As New FileStream("output.pdf", FileMode.Create)
                report.Export(pdfExport, fs)
            End Using
        End Using
    End Sub
End Class
$vbLabelText   $csharpLabel

IronPDFの実装:

// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderHtmlAsPdf("<html><body><h1>Hello World</h1><p>This is a test PDF</p></body></html>");
        pdf.SaveAs("output.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderHtmlAsPdf("<html><body><h1>Hello World</h1><p>This is a test PDF</p></body></html>");
        pdf.SaveAs("output.pdf");
    }
}
Imports IronPdf

Class Program
    Shared Sub Main()
        Dim renderer = New ChromePdfRenderer()
        Dim pdf = renderer.RenderHtmlAsPdf("<html><body><h1>Hello World</h1><p>This is a test PDF</p></body></html>")
        pdf.SaveAs("output.pdf")
    End Sub
End Class
$vbLabelText   $csharpLabel

FastReportでは、Reportオブジェクト、固定寸法のHTMLObjectを作成し、レポートを準備し、ストリーム経由でエクスポートする必要があります。 IronPdfはHTMLを直接レンダリングすることで、同じ結果を3行で達成します。 その他のオプションについては、HTML to PDF documentationを参照してください。

URLからPDFへの変換

この例では、FastReportが手動でHTMLをダウンロードする必要があるのに対して、IronPDFはURLレンダリングをネイティブで処理することを強調しています。

FastReportの実装:

// NuGet: Install-Package FastReport.OpenSource
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;
using System.Net;

class Program
{
    static void Main()
    {
        // Download HTML content from URL
        string htmlContent;
        using (WebClient client = new WebClient())
        {
            htmlContent = client.DownloadString("https://example.com");
        }

        using (Report report = new Report())
        {
            FastReport.HTMLObject htmlObject = new FastReport.HTMLObject();
            htmlObject.Width = 800;
            htmlObject.Height = 600;
            htmlObject.Text = htmlContent;

            report.Prepare();

            PDFSimpleExport pdfExport = new PDFSimpleExport();
            using (FileStream fs = new FileStream("webpage.pdf", FileMode.Create))
            {
                report.Export(pdfExport, fs);
            }
        }
    }
}
// NuGet: Install-Package FastReport.OpenSource
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;
using System.Net;

class Program
{
    static void Main()
    {
        // Download HTML content from URL
        string htmlContent;
        using (WebClient client = new WebClient())
        {
            htmlContent = client.DownloadString("https://example.com");
        }

        using (Report report = new Report())
        {
            FastReport.HTMLObject htmlObject = new FastReport.HTMLObject();
            htmlObject.Width = 800;
            htmlObject.Height = 600;
            htmlObject.Text = htmlContent;

            report.Prepare();

            PDFSimpleExport pdfExport = new PDFSimpleExport();
            using (FileStream fs = new FileStream("webpage.pdf", FileMode.Create))
            {
                report.Export(pdfExport, fs);
            }
        }
    }
}
Imports FastReport
Imports FastReport.Export.PdfSimple
Imports System.IO
Imports System.Net

Class Program
    Shared Sub Main()
        ' Download HTML content from URL
        Dim htmlContent As String
        Using client As New WebClient()
            htmlContent = client.DownloadString("https://example.com")
        End Using

        Using report As New Report()
            Dim htmlObject As New FastReport.HTMLObject()
            htmlObject.Width = 800
            htmlObject.Height = 600
            htmlObject.Text = htmlContent

            report.Prepare()

            Dim pdfExport As New PDFSimpleExport()
            Using fs As New FileStream("webpage.pdf", FileMode.Create)
                report.Export(pdfExport, fs)
            End Using
        End Using
    End Sub
End Class
$vbLabelText   $csharpLabel

IronPDFの実装:

// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderUrlAsPdf("https://example.com");
        pdf.SaveAs("webpage.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderUrlAsPdf("https://example.com");
        pdf.SaveAs("webpage.pdf");
    }
}
Imports IronPdf

Class Program
    Shared Sub Main()
        Dim renderer = New ChromePdfRenderer()
        Dim pdf = renderer.RenderUrlAsPdf("https://example.com")
        pdf.SaveAs("webpage.pdf")
    End Sub
End Class
$vbLabelText   $csharpLabel

FastReportでは、WebClientでHTMLコンテンツを手動でダウンロードし、それを固定寸法のHTMLObjectに埋め込む必要があります。IronPDFの RenderUrlAsPdf は、Chromium エンジンを使用して、 JavaScript をフル実行しながらライブ Web ページを直接レンダリングします。その他のオプションについては、 PDF ドキュメントの URL をご覧ください。

ページ番号を含むヘッダーとフッター

この例は、FastReportのバンドベースのシステムとIronPDFのHTMLベースのアプローチの複雑さの違いを示しています。

FastReportの実装:

// NuGet: Install-Package FastReport.OpenSource
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;

class Program
{
    static void Main()
    {
        using (Report report = new Report())
        {
            report.Load("template.frx");

            // Set report page properties
            FastReport.ReportPage page = report.Pages[0] as FastReport.ReportPage;

            // Add page header
            FastReport.PageHeaderBand header = new FastReport.PageHeaderBand();
            header.Height = 50;
            FastReport.TextObject headerText = new FastReport.TextObject();
            headerText.Text = "Document Header";
            header.Objects.Add(headerText);
            page.Bands.Add(header);

            // Add page footer
            FastReport.PageFooterBand footer = new FastReport.PageFooterBand();
            footer.Height = 50;
            FastReport.TextObject footerText = new FastReport.TextObject();
            footerText.Text = "Page [Page]";
            footer.Objects.Add(footerText);
            page.Bands.Add(footer);

            report.Prepare();

            PDFSimpleExport pdfExport = new PDFSimpleExport();
            using (FileStream fs = new FileStream("report.pdf", FileMode.Create))
            {
                report.Export(pdfExport, fs);
            }
        }
    }
}
// NuGet: Install-Package FastReport.OpenSource
using FastReport;
using FastReport.Export.PdfSimple;
using System.IO;

class Program
{
    static void Main()
    {
        using (Report report = new Report())
        {
            report.Load("template.frx");

            // Set report page properties
            FastReport.ReportPage page = report.Pages[0] as FastReport.ReportPage;

            // Add page header
            FastReport.PageHeaderBand header = new FastReport.PageHeaderBand();
            header.Height = 50;
            FastReport.TextObject headerText = new FastReport.TextObject();
            headerText.Text = "Document Header";
            header.Objects.Add(headerText);
            page.Bands.Add(header);

            // Add page footer
            FastReport.PageFooterBand footer = new FastReport.PageFooterBand();
            footer.Height = 50;
            FastReport.TextObject footerText = new FastReport.TextObject();
            footerText.Text = "Page [Page]";
            footer.Objects.Add(footerText);
            page.Bands.Add(footer);

            report.Prepare();

            PDFSimpleExport pdfExport = new PDFSimpleExport();
            using (FileStream fs = new FileStream("report.pdf", FileMode.Create))
            {
                report.Export(pdfExport, fs);
            }
        }
    }
}
Imports FastReport
Imports FastReport.Export.PdfSimple
Imports System.IO

Class Program
    Shared Sub Main()
        Using report As New Report()
            report.Load("template.frx")

            ' Set report page properties
            Dim page As FastReport.ReportPage = TryCast(report.Pages(0), FastReport.ReportPage)

            ' Add page header
            Dim header As New FastReport.PageHeaderBand()
            header.Height = 50
            Dim headerText As New FastReport.TextObject()
            headerText.Text = "Document Header"
            header.Objects.Add(headerText)
            page.Bands.Add(header)

            ' Add page footer
            Dim footer As New FastReport.PageFooterBand()
            footer.Height = 50
            Dim footerText As New FastReport.TextObject()
            footerText.Text = "Page [Page]"
            footer.Objects.Add(footerText)
            page.Bands.Add(footer)

            report.Prepare()

            Dim pdfExport As New PDFSimpleExport()
            Using fs As New FileStream("report.pdf", FileMode.Create)
                report.Export(pdfExport, fs)
            End Using
        End Using
    End Sub
End Class
$vbLabelText   $csharpLabel

IronPDFの実装:

// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();

        // Configure header and footer
        renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter()
        {
            HtmlFragment = "<div style='text-align:center'>Document Header</div>"
        };

        renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter()
        {
            HtmlFragment = "<div style='text-align:center'>Page {page} of {total-pages}</div>"
        };

        var pdf = renderer.RenderHtmlAsPdf("<html><body><h1>Report Content</h1><p>This is the main content.</p></body></html>");
        pdf.SaveAs("report.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();

        // Configure header and footer
        renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter()
        {
            HtmlFragment = "<div style='text-align:center'>Document Header</div>"
        };

        renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter()
        {
            HtmlFragment = "<div style='text-align:center'>Page {page} of {total-pages}</div>"
        };

        var pdf = renderer.RenderHtmlAsPdf("<html><body><h1>Report Content</h1><p>This is the main content.</p></body></html>");
        pdf.SaveAs("report.pdf");
    }
}
Imports IronPdf

Class Program
    Shared Sub Main()
        Dim renderer = New ChromePdfRenderer()

        ' Configure header and footer
        renderer.RenderingOptions.HtmlHeader = New HtmlHeaderFooter() With {
            .HtmlFragment = "<div style='text-align:center'>Document Header</div>"
        }

        renderer.RenderingOptions.HtmlFooter = New HtmlHeaderFooter() With {
            .HtmlFragment = "<div style='text-align:center'>Page {page} of {total-pages}</div>"
        }

        Dim pdf = renderer.RenderHtmlAsPdf("<html><body><h1>Report Content</h1><p>This is the main content.</p></body></html>")
        pdf.SaveAs("report.pdf")
    End Sub
End Class
$vbLabelText   $csharpLabel

FastReportでは、テンプレートファイルの読み込み、ページオブジェクトのキャスト、バンドオブジェクトの作成、高さの設定、テキストオブジェクトの作成、バンドコレクションへの追加、ページへのバンドの追加が必要です。IronPDFは、シンプルな HTML フラグメントで HtmlHeaderFooter を使用します。完全な CSS を使用してヘッダーとフッターのスタイルを設定できます。 ページ番号の構文の変更に注意してください: [Page]{page} になり、[TotalPages]{total-pages} になります。 その他のオプションについては、headers and footers documentationを参照してください。

重要な移行に関する注意事項

.frxテンプレートファイルはありません

FastReportテンプレート(.frx)はIronPDFでは動作しません。 レイアウトをHTML/CSSテンプレートに変換します:

//FastReport- loads .frx template
report.Load("report.frx");

//IronPDF- use HTML template
var html = File.ReadAllText("template.html");
var pdf = renderer.RenderHtmlAsPdf(html);
//FastReport- loads .frx template
report.Load("report.frx");

//IronPDF- use HTML template
var html = File.ReadAllText("template.html");
var pdf = renderer.RenderHtmlAsPdf(html);
' FastReport - loads .frx template
report.Load("report.frx")

' IronPDF - use HTML template
Dim html As String = File.ReadAllText("template.html")
Dim pdf = renderer.RenderHtmlAsPdf(html)
$vbLabelText   $csharpLabel

データ バインディング変換

RegisterData() を HTML の直接生成に置き換えてください:

// FastReport
report.RegisterData(dataSet, "Data");
report.GetDataSource("Data").Enabled = true;

//IronPDF- use string interpolation or StringBuilder
var html = new StringBuilder();
foreach (var item in data)
{
    html.Append($"<tr><td>{item.Name}</td><td>{item.Value}</td></tr>");
}
var pdf = renderer.RenderHtmlAsPdf(html.ToString());
// FastReport
report.RegisterData(dataSet, "Data");
report.GetDataSource("Data").Enabled = true;

//IronPDF- use string interpolation or StringBuilder
var html = new StringBuilder();
foreach (var item in data)
{
    html.Append($"<tr><td>{item.Name}</td><td>{item.Value}</td></tr>");
}
var pdf = renderer.RenderHtmlAsPdf(html.ToString());
Imports System.Text

' FastReport
report.RegisterData(dataSet, "Data")
report.GetDataSource("Data").Enabled = True

' IronPDF - use string interpolation or StringBuilder
Dim html As New StringBuilder()
For Each item In data
    html.Append($"<tr><td>{item.Name}</td><td>{item.Value}</td></tr>")
Next
Dim pdf = renderer.RenderHtmlAsPdf(html.ToString())
$vbLabelText   $csharpLabel

セキュリティ設定

//IronPDFsecurity
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SecuritySettings.UserPassword = "password";
pdf.SecuritySettings.OwnerPassword = "ownerPassword";
pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights;
//IronPDFsecurity
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SecuritySettings.UserPassword = "password";
pdf.SecuritySettings.OwnerPassword = "ownerPassword";
pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights;
'IronPDFsecurity
Dim pdf = renderer.RenderHtmlAsPdf(html)
pdf.SecuritySettings.UserPassword = "password"
pdf.SecuritySettings.OwnerPassword = "ownerPassword"
pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights
$vbLabelText   $csharpLabel

包括的なセキュリティ オプションについては、暗号化のドキュメントを参照してください。

移行後のチェックリスト

コードの移行が完了したら、以下を確認してください:

  • 生成されたPDFの視覚的な比較
  • ヘッダー/フッターとページ番号を確認する
  • 本番環境のデータ量でテストする
  • セキュリティ/暗号化機能の検証
  • パフォーマンスベンチマーク
  • 未使用の.frxテンプレートファイルを削除する
  • FastReport関連のコードを削除する
  • ドキュメントの更新

PDFインフラストラクチャの将来性を確保する

.NET 10が目前に迫り、C# 14が新しい言語機能を導入する中、最新のWeb技術を取り入れたPDFライブラリを選択することで、長期的な保守性を確保することができます。 IronPdfのHTML/CSSアプローチは、テンプレートがウェブ開発で使われるのと同じスキルを活用することを意味します。 プロジェクトが2025年、2026年へと拡大する中、FlexboxやGridのようなCSS3機能を備えた標準的なHTMLテンプレートを使用することで、FastReport独自のフォーマットにはないデザインの柔軟性が得られます。

その他のリソース


FastReportからIronPdfへの移行は、ビジュアルデザイナーへの依存、バンドベースの学習曲線、断片化されたパッケージモデルを排除します。 HTML/CSSベースのPDF生成への移行は、使い慣れたWeb技術を活用しながら、PDFの完全な操作機能(マージ、分割、セキュリティ、フォーム)を単一のパッケージで提供します。

カーティス・チャウ
テクニカルライター

Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。

開発以外にも、CurtisはIoT(Internet of Things)への強い関心を持ち、ハードウェアとソフトウェアの統合方法を模索しています。余暇には、ゲームをしたりDiscordボットを作成したりして、技術に対する愛情と創造性を組み合わせています。

アイアンサポートチーム

私たちは週5日、24時間オンラインで対応しています。
チャット
メール
電話してね