製品比較

IronPDFとPDFShiftの比較

更新済み 9月 25, 2022
共有:

Portable Document Format (ポータブルドキュメントフォーマット) (PDF)** は、テキスト、リンク、ボタン、グラフィックなどを単一のドキュメントで表現するための最も人気のあるドキュメント形式です。 C#プログラミング言語でPDFを操作することは、C#用PDF APIを使用しない限りほぼ不可能です。 この記事では、2つの異なるAPIを使用してPDFドキュメントとやり取りし、操作する方法を探るとともに、両方のAPIの性能、機能、ライセンスについて比較します。

この記事で議論するPDF APIは以下の通りです:

  • IronPDF

    PDFShift

1. IronPDF

IronPDFは、強力なHTMLからPDFへの変換APIです。 IronPDFは、.NETおよび.NET Core開発におけるHTMLサイトの変換に最適なソリューションです。 それはHTMLを変換するだけでなく、さまざまな追加機能も備えています。 IronPDFは、開発者が.NET Coreと.NET FrameworkプロジェクトでPDFドキュメントを作成、変更、および取得することを可能にします。 IronPDFパッケージを使用すると、開発者はHTMLページからPDFを簡単に生成または変更することができます。

PDFは簡単に編集、スタンプ、ヘッダーとフッターの追加ができます。 また、PDFテキストの読み取りや画像の抽出が非常に簡単になります。 IronPDFは、.NETのChromiumエンジンを使用してHTMLページをPDFファイルに変換します。

1.1. IronPDF の機能

1.1.1. PDF変換

この機能には、HTML、HTML文字列、MVCビュー、Webフォーム、およびURLなどの異なる形式からのPDF作成が含まれます。

1.1.2. PDFイメージング

これは、ユーザーがPDFから画像を作成し、画像からPDFを作成することを可能にします。 以下を含みます:画像抽出、さまざまな画像拡張のサポート、およびPDF印刷。

1.1.3. PDFファイルの入出力

IronPDFは、128ビット暗号化、パスワードによるロック、デジタル署名の機能も提供します。

1.1.4. PDFの編集

IronPDFのこの機能は、ウォーターマークの追加、ページの追加、ページの削除、背景の追加、前景の追加など、あらゆる種類のPDFフォーマットを提供します。 要するに、IronPDFはPDFを操作するために必要なすべての機能を提供します。

1.1.5. PDFコンテンツ抽出

多くの場合、PDF から直接埋め込まれたテキストを抽出することができます。 それでもうまくいかない場合、テキストが実際には画像に埋め込まれている可能性があります。 IronOCRライブラリを使用して、プレーンテキストではなく視覚的なテキストのためにドキュメントをスキャンします。

1.1.6. ヘッダーとフッター

ヘッダーとフッターはPDFの作成時や既存のPDFへの追加時に追加することができます。 Print Optionsプロパティにより、各ドキュメントページにヘッダーとフッターを作成することができます。 Chrome PDF Rendererオブジェクトでこれらのオプションにアクセスします。 このサンプルは、.NET Core コンソールアプリケーション内で動作します。

1.1.7. 互換性

IronPDFは、C#に対応したほぼすべてのオペレーティングシステムとフレームワークをサポートしています。これには次のものが含まれます:

  • ウィンドウズ
  • Linux (リナックス)
  • .NET Core 2.1、3.0、3.1、.NET 6 & 5
  • ユニバーサル互換性のための.NET Standard 2.0準拠
  • マイクロソフト・アジュール
  • アマゾンウェブサービス (AWS)

  • Docker (ドッカー)

2. PDFシフト

PDFShiftは、組織がHTMLページを数秒でPDFに変換できるHTMLからPDFへの変換APIツールです。 並列変換、非同期クエリ、生のHTMLサポート、その他の機能は、クラウドサーバーベースのAPIツールを通じて利用可能です。 PDFShiftは、Ruby、Python、JavaScript、Node、PHPなど広範な開発言語をサポートし、変換プロセスを簡単にするシンプルなソリューションです。

PDFShiftは、カスタムヘッダーおよびフッターの設定、カスタムCSSの適用、ファイルの暗号化など、多くの機能を提供し、企業が変換処理を完全に管理できるようにします。

2.1. PDFShiftの機能

2.1.1. 並列変換

PDFShiftは並列変換をサポートしており、ユーザーが複数のドキュメントを同時に変換することにより、変換速度を向上させることができます。

2.1.2. 高度なヘッダーとフッターのオプション

カスタムヘッダーおよびフッターをページ番号付きで作成、カスタムCSSおよびJavaScriptの使用、ドキュメントの暗号化などが可能です。

2.1.3. 生のHTMLデータからPDFへの変換API

PDFShiftは、ページを公開せずに生のHTMLからPDFへの変換をサポートします。

2.1.4. 高精度PDF

PDFShiftは、HTMLを高精度なPDFドキュメントに数秒で変換します。

非同期リクエスト

変換が完了したときに通知を受け取るには、私たちの高度なリアルタイムシステムを使用してください。 強力なPDFShift APIを使用してHTMLをPDFに変換し、わずか3行のコードでシステムに統合します。

Visual Studio で新しいプロジェクトを作成する方法

Visual Studioソフトウェアを開き、[ファイル]メニューに移動します。 「新しいプロジェクト」を選択し、次に「コンソール アプリケーション」を選択してください。 この記事では、コンソールアプリケーションを使用してPDFドキュメントを生成します。

プロジェクト名を入力し、適切なテキストボックスにパスを選択してください。 次に、「Create」ボタンをクリックしてください。 以下のスクリーンショットのように、必要な.NETフレームワークを選択してください:

Visual Studio プロジェクトは、選択されたアプリケーションの構造を生成します。コンソール、Windows、およびWebアプリケーションを選択した場合、コードを入力し、アプリケーションをビルド/実行できる program.cs ファイルが開かれます。

ライブラリを追加して、プログラムをテストすることができます。

IronPDF ライブラリのインストール

IronPDFライブラリは、4つの異なる方法でダウンロードおよびインストールできます。 これらは:

  • Visual Studio NuGet パッケージ マネージャーを使用する
  • Visual Studio コマンドラインの使用。
  • NuGetウェブページからの直接ダウンロード。
  • IronPDFのウェブページから直接ダウンロード。

Visual StudioのNuGetパッケージマネージャーを使用する

Visual Studioソフトウェアは、ソリューションにパッケージを直接インストールするためのNuGetパッケージマネージャーオプションを提供します。 以下のスクリーンショットは、NuGetパッケージマネージャーの開き方を示しています。

NuGetウェブサイトから利用可能なパッケージライブラリのリストを表示するための検索ボックスが提供されています。パッケージマネージャーでは、以下のスクリーンショットのように「IronPDF」というキーワードで検索する必要があります。

上記の画像では、検索結果に関連したパッケージの一覧が表示されています。 私たちはIronPDFオプションを選択し、ソリューションにパッケージをインストールする必要があります。

4.2 Visual Studio コマンドラインの使用

Visual Studioのメニューで、ツール > NuGetパッケージマネージャー > パッケージマネージャーコンソール に移動します。

パッケージマネージャー コンソール タブに次の行を入力してください:

Install-Package IronPdf

現在、パッケージは現在のプロジェクトにダウンロード/インストールされ、使用できるようになります。

NuGetウェブページからの直接ダウンロード

3つ目の方法は、ウェブページから直接NuGetパッケージをダウンロードすることです。

  • リンクに移動 https://www.nuget.org/packages/IronPdf/
  • 右側のメニューからダウンロードパッケージオプションを選択してください。
  • ダウンロードしたパッケージをダブルクリックします。 それは自動的にインストールされます。
  • ソリューションを再読み込みして、プロジェクトで使用を開始してください。

4.4 IronPDFのウェブページから直接ダウンロード

クリックしてください リンク ウェブページから最新のパッケージを直接ダウンロードするにはこちらをクリックしてください。 ダウンロード後、以下の手順に従ってパッケージをプロジェクトに追加してください。

  • ソリューションウィンドウからプロジェクトを右クリックします。
  • その後、オプションのリファレンスを選択し、ダウンロードしたリファレンスの場所を参照してください。

  • 次に、「OK」をクリックしてリファレンスを追加します。

PDFShiftの作業

PDFShiftはプロジェクトに統合できません—代わりに、リモートで動作します。 PDFShiftのAPIにPOSTリクエストを提出するには、C#のRestClientパッケージを使用して、シンプルな認証のユーザー引数としてAPIキーを指定します。 サーバーはリクエストを受け取り、それを処理して出力ファイルを返します。PDF変換APIの作業はHTTP POSTリクエストによって行われます。PDFShiftは多くの言語に対応したAPIを提供し、すべての言語でリモートで動作します。

6. HTMLからPDFを作成

両方のツールにはHTML変換の機能が含まれていますが、それぞれ少し異なる方法で実行されます。

6.1. IronPDFを使用してURLからPDFを作成する

URLを使用してC#でPDFファイルを作成するのは、上記の例と同様に、これらの3行のコードだけで簡単に実行できます。 次のコードは、URLからPDFファイルを作成する方法を示します。

using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
// Create a PDF from a URL or local file path
using var pdf = Renderer.RenderUrlAsPdf("https://www.amazon.com/?tag=hp2-brobookmark-us-20");
// Export to a file or Stream
pdf.SaveAs("url.pdf");
using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
// Create a PDF from a URL or local file path
using var pdf = Renderer.RenderUrlAsPdf("https://www.amazon.com/?tag=hp2-brobookmark-us-20");
// Export to a file or Stream
pdf.SaveAs("url.pdf");
Imports IronPdf
Private Renderer = New IronPdf.ChromePdfRenderer()
' Create a PDF from a URL or local file path
Private pdf = Renderer.RenderUrlAsPdf("https://www.amazon.com/?tag=hp2-brobookmark-us-20")
' Export to a file or Stream
pdf.SaveAs("url.pdf")
VB   C#

以下のコードの出力は次のとおりです。

6.2. HTMLをPDFに変換する方法(IronPDFを使用)

IronPDF C# .NETライブラリを使用して、HTMLをPDFに変換するのは非常に簡単です。

var pdf = new ChromePdfRenderer();
PdfDocument doc = pdf.RenderHtmlAsPdf("<h1>This is a heading</h1>");
mypdf.SaveAs("FirstPDFDocument.pdf");
var pdf = new ChromePdfRenderer();
PdfDocument doc = pdf.RenderHtmlAsPdf("<h1>This is a heading</h1>");
mypdf.SaveAs("FirstPDFDocument.pdf");
Dim pdf = New ChromePdfRenderer()
Dim doc As PdfDocument = pdf.RenderHtmlAsPdf("<h1>This is a heading</h1>")
mypdf.SaveAs("FirstPDFDocument.pdf")
VB   C#

URLを使用してPDFを作成する方法 – PDFShift

PDFShiftを使用してURLを変換するのは非常に簡単です。 次の例のように、ソースパラメーターをURLに設定してPOSTリクエストを送信するだけです。

using System;
using RestSharp;
using Newtonsoft.Json;
using System.IO;
using RestSharp.Authenticators;
using RestSharp.Serialization;
using System.Net.Mail;
using System.Net;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;

namespace PDFShiftExample
{
  class Program
  {
      static void Main(string [] args)
      {
          IRestClient client = new RestClient("https://api.pdfshift.io/v3/convert/pdf");
          client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");

          IRestRequest request = new RestRequest(Method.POST);

          var json = new
          {
              source = "https://www.example.com"
          };
          request.AddJsonBody(json);

          IRestResponse response = client.Execute(request);
          if (!response.IsSuccessful)
          {
              // Check why status is not int 2xx.
          }
          else
          {
              File.WriteAllBytes("result.pdf", response.RawBytes);
          }
      }
  }
}
using System;
using RestSharp;
using Newtonsoft.Json;
using System.IO;
using RestSharp.Authenticators;
using RestSharp.Serialization;
using System.Net.Mail;
using System.Net;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;

namespace PDFShiftExample
{
  class Program
  {
      static void Main(string [] args)
      {
          IRestClient client = new RestClient("https://api.pdfshift.io/v3/convert/pdf");
          client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");

          IRestRequest request = new RestRequest(Method.POST);

          var json = new
          {
              source = "https://www.example.com"
          };
          request.AddJsonBody(json);

          IRestResponse response = client.Execute(request);
          if (!response.IsSuccessful)
          {
              // Check why status is not int 2xx.
          }
          else
          {
              File.WriteAllBytes("result.pdf", response.RawBytes);
          }
      }
  }
}
Imports System
Imports RestSharp
Imports Newtonsoft.Json
Imports System.IO
Imports RestSharp.Authenticators
Imports RestSharp.Serialization
Imports System.Net.Mail
Imports System.Net
Imports System.Collections.Generic
Imports Newtonsoft.Json.Linq

Namespace PDFShiftExample
  Friend Class Program
	  Shared Sub Main(ByVal args() As String)
		  Dim client As IRestClient = New RestClient("https://api.pdfshift.io/v3/convert/pdf")
		  client.Authenticator = New HttpBasicAuthenticator("api", "your_api_key")

		  Dim request As IRestRequest = New RestRequest(Method.POST)

		  Dim json = New With {Key .source = "https://www.example.com"}
		  request.AddJsonBody(json)

		  Dim response As IRestResponse = client.Execute(request)
		  If Not response.IsSuccessful Then
			  ' Check why status is not int 2xx.
		  Else
			  File.WriteAllBytes("result.pdf", response.RawBytes)
		  End If
	  End Sub
  End Class
End Namespace
VB   C#

6.4. PDFShiftを使用したHTMLからPDFへの変換

PDFShiftもHTMLからPDFへの直接変換を提供しますが、HTMLファイルからHTMLコンテンツを読み取ります。

namespace PDFShiftExample
{
  class Program
  {
      static void Main(string [] args)
      {
          IRestClient client = new RestClient("https://api.pdfshift.io/v3/convert/pdf");
          client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");

          IRestRequest request = new RestRequest(Method.POST);

          string documentContent = File.ReadAllText("document.html");
          var json = new
          {
              source = documentContent
          };
          request.AddJsonBody(json);

          IRestResponse response = client.Execute(request);
          if (!response.IsSuccessful)
          {
              // Check why status is not int 2xx.
          }
          else
          {
              File.WriteAllBytes("result.pdf", response.RawBytes);
          }
      }
  }
}
namespace PDFShiftExample
{
  class Program
  {
      static void Main(string [] args)
      {
          IRestClient client = new RestClient("https://api.pdfshift.io/v3/convert/pdf");
          client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");

          IRestRequest request = new RestRequest(Method.POST);

          string documentContent = File.ReadAllText("document.html");
          var json = new
          {
              source = documentContent
          };
          request.AddJsonBody(json);

          IRestResponse response = client.Execute(request);
          if (!response.IsSuccessful)
          {
              // Check why status is not int 2xx.
          }
          else
          {
              File.WriteAllBytes("result.pdf", response.RawBytes);
          }
      }
  }
}
Namespace PDFShiftExample
  Friend Class Program
	  Shared Sub Main(ByVal args() As String)
		  Dim client As IRestClient = New RestClient("https://api.pdfshift.io/v3/convert/pdf")
		  client.Authenticator = New HttpBasicAuthenticator("api", "your_api_key")

		  Dim request As IRestRequest = New RestRequest(Method.POST)

		  Dim documentContent As String = File.ReadAllText("document.html")
		  Dim json = New With {Key .source = documentContent}
		  request.AddJsonBody(json)

		  Dim response As IRestResponse = client.Execute(request)
		  If Not response.IsSuccessful Then
			  ' Check why status is not int 2xx.
		  Else
			  File.WriteAllBytes("result.pdf", response.RawBytes)
		  End If
	  End Sub
  End Class
End Namespace
VB   C#

カスタムヘッダーとフッター

PDFのヘッダーとフッターの追加は、PDFを扱う際の必須機能です。 両方のツールがこのオプションをサポートしています。

7.1. IronPDF を使用したカスタムヘッダーとフッター

IronPDFを使用すると、ヘッダーとフッターを2つの異なる方法で追加できます。

TextHeaderFooter は、動的データを統合するオプションを含む、テキストベースのヘッダーを追加することを可能にします。

HtmlHeaderFooter は、開発者がHTMLヘッダーとフッターをPDFファイルにレンダリングし、動的データのテンプレート化も可能にします。 それはより柔軟ですが、使用するのが難しいです。

using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
Renderer.RenderingOptions.FirstPageNumber = 1; // use 2 if a coverpage  will be appended
Renderer.RenderingOptions.TextHeader.DrawDividerLine = true;
Renderer.RenderingOptions.TextHeader.CenterText = "{url}";
Renderer.RenderingOptions.TextHeader.Font = IronPdf.Font.FontTypes.Helvetica;
Renderer.RenderingOptions.TextHeader.FontSize = 12;
using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
Renderer.RenderingOptions.FirstPageNumber = 1; // use 2 if a coverpage  will be appended
Renderer.RenderingOptions.TextHeader.DrawDividerLine = true;
Renderer.RenderingOptions.TextHeader.CenterText = "{url}";
Renderer.RenderingOptions.TextHeader.Font = IronPdf.Font.FontTypes.Helvetica;
Renderer.RenderingOptions.TextHeader.FontSize = 12;
Imports IronPdf
Private Renderer = New IronPdf.ChromePdfRenderer()
Renderer.RenderingOptions.FirstPageNumber = 1 ' use 2 if a coverpage  will be appended
Renderer.RenderingOptions.TextHeader.DrawDividerLine = True
Renderer.RenderingOptions.TextHeader.CenterText = "{url}"
Renderer.RenderingOptions.TextHeader.Font = IronPdf.Font.FontTypes.Helvetica
Renderer.RenderingOptions.TextHeader.FontSize = 12
VB   C#

7.2. PDFShiftを使用したカスタムヘッダーとフッター

結果のドキュメントにカスタムヘッダーまたはフッターを追加してカスタマイズすることができます。 これらは、現在のページを識別したり、すべてのページに会社のロゴを表示するためによく使用されます。

using System;
using RestSharp;
using Newtonsoft.Json;
using System.IO;
using RestSharp.Authenticators;
using RestSharp.Serialization;
using System.Net.Mail;
using System.Net;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;

namespace PDFShiftExample
{
  class Program
  {
      static void Main(string [] args)
      {
          IRestClient client = new RestClient("https://api.pdfshift.io/v3/convert/pdf");
          client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");

          IRestRequest request = new RestRequest(Method.POST);

          var json = new
          {
              source = "https://quillbot.com/",
              footer = new { source = "<div style=\"font-size: 12px\">Page {{page}} of {{total}}</div>", spacing = "50px" }
          };
          request.AddJsonBody(json);

          IRestResponse response = client.Execute(request);
          if (!response.IsSuccessful)
          {
              // Check why status is not int 2xx.
          }
          else
          {
              File.WriteAllBytes("result.pdf", response.RawBytes);
          }
      }
  }
}
using System;
using RestSharp;
using Newtonsoft.Json;
using System.IO;
using RestSharp.Authenticators;
using RestSharp.Serialization;
using System.Net.Mail;
using System.Net;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;

namespace PDFShiftExample
{
  class Program
  {
      static void Main(string [] args)
      {
          IRestClient client = new RestClient("https://api.pdfshift.io/v3/convert/pdf");
          client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");

          IRestRequest request = new RestRequest(Method.POST);

          var json = new
          {
              source = "https://quillbot.com/",
              footer = new { source = "<div style=\"font-size: 12px\">Page {{page}} of {{total}}</div>", spacing = "50px" }
          };
          request.AddJsonBody(json);

          IRestResponse response = client.Execute(request);
          if (!response.IsSuccessful)
          {
              // Check why status is not int 2xx.
          }
          else
          {
              File.WriteAllBytes("result.pdf", response.RawBytes);
          }
      }
  }
}
Imports System
Imports RestSharp
Imports Newtonsoft.Json
Imports System.IO
Imports RestSharp.Authenticators
Imports RestSharp.Serialization
Imports System.Net.Mail
Imports System.Net
Imports System.Collections.Generic
Imports Newtonsoft.Json.Linq

Namespace PDFShiftExample
  Friend Class Program
	  Shared Sub Main(ByVal args() As String)
		  Dim client As IRestClient = New RestClient("https://api.pdfshift.io/v3/convert/pdf")
		  client.Authenticator = New HttpBasicAuthenticator("api", "your_api_key")

		  Dim request As IRestRequest = New RestRequest(Method.POST)

		  Dim json = New With {
			  Key .source = "https://quillbot.com/",
			  Key .footer = New With {
				  Key .source = "<div style=""font-size: 12px"">Page {{page}} of {{total}}</div>",
				  Key .spacing = "50px"
			  }
		  }
		  request.AddJsonBody(json)

		  Dim response As IRestResponse = client.Execute(request)
		  If Not response.IsSuccessful Then
			  ' Check why status is not int 2xx.
		  Else
			  File.WriteAllBytes("result.pdf", response.RawBytes)
		  End If
	  End Sub
  End Class
End Namespace
VB   C#

9. 透かし

プログラミング言語を使用してPDFにウォーターマークを追加することは、非常に難しい作業です。 IronPDFとPDFShiftの両方は、PDFの透かしサポートを提供します。

9.1. IronPDFを使用したウォーターマークの追加

IronPDF は、HTML を使用して PDF ドキュメントに「ウォーターマーク」を追加する方法を提供します。 透かしは既存のコンテンツの上または下に表示されるように設定でき、不透明度、回転、およびハイパーリンクの組み込み機能があります。

using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();

using var Pdf = Renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf");
Pdf.WatermarkAllPages("<h2 style='color:red'>SAMPLE</h2>", IronPdf.Editing.WaterMarkLocation.MiddleCenter, 50, -45, "https://www.nuget.org/packages/IronPdf");
Pdf.SaveAs(@"C:\Path\To\Watermarked.pdf");
using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();

using var Pdf = Renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf");
Pdf.WatermarkAllPages("<h2 style='color:red'>SAMPLE</h2>", IronPdf.Editing.WaterMarkLocation.MiddleCenter, 50, -45, "https://www.nuget.org/packages/IronPdf");
Pdf.SaveAs(@"C:\Path\To\Watermarked.pdf");
Imports IronPdf
Private Renderer = New IronPdf.ChromePdfRenderer()

Private Pdf = Renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf")
Pdf.WatermarkAllPages("<h2 style='color:red'>SAMPLE</h2>", IronPdf.Editing.WaterMarkLocation.MiddleCenter, 50, -45, "https://www.nuget.org/packages/IronPdf")
Pdf.SaveAs("C:\Path\To\Watermarked.pdf")
VB   C#

9.2. PDFShiftを使用した透かし

ユーザーはPDF上に明確に識別できるウォーターマークが必要です。

using System;
using RestSharp;
using Newtonsoft.Json;
using System.IO;
using RestSharp.Authenticators;
using RestSharp.Serialization;
using System.Net.Mail;
using System.Net;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;

namespace PDFShiftExample
{
  class Program
  {
      static void Main(string [] args)
      {
          IRestClient client = new RestClient("https://api.pdfshift.io/v3/convert/pdf");
          client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");

          IRestRequest request = new RestRequest(Method.POST);

          var json = new
          {
              source = "https://www.example.com",
              watermark = new { image = "https://pdfshift-dev.netlify.com/images/logo/logo-violet.png", offset_x = 50, offset_y = "100px", rotate = 45 }

          };
          request.AddJsonBody(json);

          IRestResponse response = client.Execute(request);
          if (!response.IsSuccessful)
          {
              // Check why status is not int 2xx.
          }
          else
          {
              File.WriteAllBytes("result.pdf", response.RawBytes);
          }
      }
  }
}
using System;
using RestSharp;
using Newtonsoft.Json;
using System.IO;
using RestSharp.Authenticators;
using RestSharp.Serialization;
using System.Net.Mail;
using System.Net;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;

namespace PDFShiftExample
{
  class Program
  {
      static void Main(string [] args)
      {
          IRestClient client = new RestClient("https://api.pdfshift.io/v3/convert/pdf");
          client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");

          IRestRequest request = new RestRequest(Method.POST);

          var json = new
          {
              source = "https://www.example.com",
              watermark = new { image = "https://pdfshift-dev.netlify.com/images/logo/logo-violet.png", offset_x = 50, offset_y = "100px", rotate = 45 }

          };
          request.AddJsonBody(json);

          IRestResponse response = client.Execute(request);
          if (!response.IsSuccessful)
          {
              // Check why status is not int 2xx.
          }
          else
          {
              File.WriteAllBytes("result.pdf", response.RawBytes);
          }
      }
  }
}
Imports System
Imports RestSharp
Imports Newtonsoft.Json
Imports System.IO
Imports RestSharp.Authenticators
Imports RestSharp.Serialization
Imports System.Net.Mail
Imports System.Net
Imports System.Collections.Generic
Imports Newtonsoft.Json.Linq

Namespace PDFShiftExample
  Friend Class Program
	  Shared Sub Main(ByVal args() As String)
		  Dim client As IRestClient = New RestClient("https://api.pdfshift.io/v3/convert/pdf")
		  client.Authenticator = New HttpBasicAuthenticator("api", "your_api_key")

		  Dim request As IRestRequest = New RestRequest(Method.POST)

		  Dim json = New With {
			  Key .source = "https://www.example.com",
			  Key .watermark = New With {
				  Key .image = "https://pdfshift-dev.netlify.com/images/logo/logo-violet.png",
				  Key .offset_x = 50,
				  Key .offset_y = "100px",
				  Key .rotate = 45
			  }
		  }
		  request.AddJsonBody(json)

		  Dim response As IRestResponse = client.Execute(request)
		  If Not response.IsSuccessful Then
			  ' Check why status is not int 2xx.
		  Else
			  File.WriteAllBytes("result.pdf", response.RawBytes)
		  End If
	  End Sub
  End Class
End Namespace
VB   C#

翻訳された内容は以下の通りです:

  1. ライセンス

IronPDFは、無料の開発者ライセンスを提供するライブラリです。 IronPDFは、特別な価格構造も提供しています。ライトパッケージは隠れた費用なしで$749から始まります。 SaaSおよびOEM製品を再配布することも可能です。 すべてのライセンスには30日間の返金保証、1年間のソフトウェアサポートおよびアップグレード、開発/テスト/ステージング/本番環境での有効性、そして永久ライセンスが含まれます。 (一回限りの購入). IronPDFライセンスは、ユーザーのニーズに対して最大のパフォーマンスを提供します。 このリンクをクリックして、IronPDFの全ての料金体系とライセンス情報をご覧ください。

PDFShift PDF 変換 API は、月払いおよび年払いの 5 つの異なるライセンス パッケージを提供しています。 以下のパッケージを購入するために「クレジット」のシステムが使用されており、その詳細は次の通りです:

  1. 無料パッケージ (1か月につき50クレジット)

  2. スタートアップ (月額$9で500クレジット、年間$99で6,000クレジット)

  3. Boost(ブースト) (月額24ドルで2,500クレジット、年額240ドルで30,000クレジット)

  4. 成長 (月に5,000クレジットが39ドル、年に60,000クレジットが390ドル)

  5. ビジネス (月額$99で25,000クレジット)

    また、ファイルサイズの制限もあります。無料パッケージでは1ファイルあたりの制限が1MBで、他のパッケージでは1ファイルあたり5MBの制限があります。

    詳細情報および価格については、以下を参照してください。 リンク.

10. 結論

IronPDFは、独立系開発者向けのフリーアプリケーションで、多様な機能とPDFファイルの編集および他の形式への変換機能を提供します。 IronPDFはPDF処理のための最良の編集およびフォーマットツールを提供します。 商業印刷に適した高品質のベクターファイルにHTMLからPDFへの変換を行います。 その結果として、明確で高品質なPDFが得られます。 このウェブページにはライセンスおよび価格情報が含まれています。

PDFShiftは、高品質、高精度、強力なHTMLからPDFへの変換APIです。 それは、多数のツールを備えた学びやすいエンドポイントを提供し、完全な機能セットに近づく手段を提供します。また、いくつかの言語向けのパッケージも含まれています。 PDFShiftは、postMessageを使用してサーバーにリクエストを送信し、ドキュメントの並行変換を処理できます。つまり、複数のドキュメントを同時に変換することができます。

IronPDFのライセンスは開発者ベースであり、製品を使用する開発者の人数に基づいてライセンスを購入する必要があります。 一方、PDFShiftのライセンスは月額および年額のクレジットベースとなっており、サブスクライブしたパッケージに基づいて月ごとに特定のクレジットを受け取ります。 IronPDFはOMEおよびSaaS配信をサポートしていますが、PDFShiftはそれをサポートしていません。 IronPDFライセンスは一度の購入で済み、生涯使用することができますが、PDFShiftは月間および年間ライセンスを提供しています。

両方のツールを簡単に比較した結果、IronPDFライブラリはPDFShiftよりもはるかに多くの機能を提供していると結論付けることができます。 PDFShiftは、PDF操作のための機能がわずかしか提供されていません。 IronPDFは、わずか3行のコードでURLをPDFに変換できますが、PDFShiftは同じタスクを実行するのにもっと多くのコード行が必要です。 IronPDFの統合は簡単で、わずか数分で完了できます。 PDFShiftはクラウドベースのシステムで動作し、統合する必要はありません。 ただし、実際にはRest Sharpなどの他のAPIに依存するため、複雑な手続きとなります。

さらに、Iron Softwareは現在、2つの価格で5つのツールパッケージを提供しています。Iron Suiteに含まれるツールは次のとおりです:

  • IronBarcode

    アイアンXL

  • IronOCR (アイアンOCR)
  • IronPDF

  • アイアンウェブスクレーパー

    このリンクを訪問して、以下を調べてください IRONSUITE.

< 以前
IronPDFとNReco .NET Coreの比較
次へ >
IronPDFとSautinSoft PDF Focusの比較

準備はできましたか? バージョン: 2024.9 新発売

無料のNuGetダウンロード 総ダウンロード数: 10,659,073 View Licenses >