IronPrintを使い始める

Curtis Chau
Curtis Chau
更新日: 2026年7月21日

IronPrint: .NET 向けオールインワン印刷ライブラリ

IronPrint は、Iron Software によって開発された印刷ライブラリです。 このライブラリは、Windows、macOS、Android、iOS など、さまざまな環境と互換性があります。

互換性

IronPrint は、以下のプラットフォームとのクロスプラットフォーム サポート互換性を備えています。

.NET バージョンのサポート

  • C#、VB.NET、F#
  • .NET 8、7、6、5 、および Core 3.1 以上
  • .NET Framework (4.6.2+)

オペレーティングシステムと環境のサポート

  • Windows (7以降、Server 2016以降)
  • macOS (10+)
  • iOS (11以上)
  • Android API 21+ (v5 "Lollipop")

.NET プロジェクトタイプのサポート

  • モバイル (Xamarin & MAUI & Avalonia)
  • デスクトップ (WPF & MAUI & Windows Avalonia)
  • コンソール (App & ライブラリ)

インストール

IronPrintライブラリ

NuGet パッケージ マネージャーを使用して IronPrint パッケージをインストールします。

> dotnet add package IronPrint

別の方法として、公式IronPrint NuGetウェブサイトから直接ダウンロードできます。

インストールされたら、C#コードの先頭にusing IronPrint;を追加して始めることができます。

ライセンスキーの適用

次に、LicenseクラスのLicenseKeyプロパティにライセンスキーを割り当てることで、IronPrintに有効なライセンスまたはトライアルキーを適用します。 IronPrint メソッドを使用する前に、import ステートメントの直後に次のコードを含めます。

using IronPrint;

// Apply your IronPrint license key here
License.LicenseKey = "your-license-key-here";

コード例

文書を印刷

ファイルパスをPrintメソッドに渡して、ドキュメントを印刷します。

using IronPrint;

class Program
{
    static void Main()
    {
        // Specify the file path to be printed
        string filePath = "document.pdf";

        // Invoke the Print method to print the document
        IronPrint.Print(filePath);
    }
}

ダイアログ付き印刷

ドキュメントを印刷するには、印刷前に印刷ダイアログも表示されるShowPrintDialogメソッドを使用します。

using IronPrint;

class Program
{
    static void Main()
    {
        // Specify the file path to be printed
        string filePath = "document.pdf";

        // Invoke the ShowPrintDialog method to prompt the dialog before printing
        IronPrint.ShowPrintDialog(filePath);
    }
}

印刷設定をカスタマイズする

コードから印刷設定を構成するには、PrintSettingsクラスをインスタンス化します。 PrintSettingsオブジェクトを構成し、それを印刷メソッドのいずれかに渡します。

using IronPrint;

class Program
{
    static void Main()
    {
        // Create a PrintSettings object to configure printer settings
        PrintSettings settings = new PrintSettings
        {
            NumberOfCopies = 2,
            PaperOrientation = PaperOrientation.Landscape
        };

        // Specify the file path to be printed
        string filePath = "document.pdf";

        // Invoke the Print method with custom print settings
        Printer.Print(filePath, settings);
    }
}

ライセンスとサポートの提供

IronPrintは有料ライブラリです。 しかし、無料トライアルライセンスもこちらで入手可能です。

Iron Softwareに関する詳細情報は、当社のウェブサイト https://ironsoftware.com/をご覧ください。サポートやお問い合わせは、当社のチームにお問い合わせください。

Iron Software からのサポート

一般的なサポートや技術的なお問い合わせは、次のメールアドレスまでご連絡ください:support@ironsoftware.com。

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

もっと読む

準備はできましたか?

NuGetダウンロード数 52,427バージョン:2026.11ちょうどリリースされました