ASP.NET Core MVCでビューをPDFに変換する方法

How to Convert Views to PDFs in ASP.NET Core MVC

This article was translated from English: Does it need improvement?
Translated
View the article in English

ビューは、ウェブアプリケーションでHTMLマークアップを生成するために使用されるASP.NETフレームワークのコンポーネントです。 これは、ASP.NET MVCおよびASP.NET Core MVCアプリケーションで一般的に使用されるモデルビューコントローラ(MVC)パターンの一部です。 ビューは、動的にHTMLコンテンツをレンダリングすることでユーザーにデータを提示する責任を負います。

クイックスタート: CSHTMLをPDFにASP.NET Coreで簡単に変換する

IronPDFを使用して、ASP.NET Core MVCビューを簡単にPDFに変換します。 コードを1行だけ記述するだけで、'.cshtml'ファイルを高品質なPDFドキュメントにレンダリングできます。 この機能を直接MVCアプリケーションに統合して動的なHTMLビューからシームレスにPDFを生成し、開発プロセスを簡素化しましょう。 環境の設定方法を案内に従って始めてみてください。

Nuget IconGet started making PDFs with NuGet now:

  1. Install IronPDF with NuGet Package Manager

    PM > Install-Package IronPdf

  2. Copy and run this code snippet.

    // using IronPdf.Extensions.Mvc.Core
    new IronPdf.ChromePdfRenderer().RenderRazorViewToPdf(HttpContext, "Views/Home/Report.cshtml", model).SaveAs("report.pdf");
  3. Deploy to test on your live environment

    Start using IronPDF in your project today with a free trial
    arrow pointer

ASP.NET Core Web App MVC (モデル-ビュー-コントローラ)は、ASP.NET Coreを使用してウェブアプリケーションを構築するためにMicrosoftが提供するウェブアプリケーションです。

  • モデル: データとビジネスロジックを表し、データのやり取りを管理し、データソースと通信します。
  • ビュー: ユーザーインターフェイスを提示し、データの表示に焦点を当て、情報をユーザーにレンダリングします。
  • コントローラ: ユーザー入力を処理し、リクエストに応答し、モデルと通信し、モデルとビュー間のやり取りを調整します。

IronPDFは、ASP.NET Core MVCプロジェクト内のビューからPDFファイルを作成するプロセスを簡素化します。 これにより、ASP.NET Core MVCでのPDF生成が簡単かつ直接的になります。

class="hsg-featured-snippet">

最小ワークフロー (5ステップ)

  1. ASP.NET Core MVCでビューをPDFに変換するC#ライブラリをダウンロード
  2. データ用のモデルクラスを追加
  3. "HomeController.cs"ファイルを編集し、RenderRazorViewToPdfメソッドを使用
  4. 新しいビューを作成し、".cshtml"ファイルを編集してPDFをレンダリング
  5. クイックスタート用のサンプルプロジェクトをダウンロード

IronPDF拡張パッケージ

IronPdf.Extensions.Mvc.Coreパッケージは、メインのIronPdfパッケージの拡張です。 ASP.NET Core MVCでビューをPDFドキュメントにレンダリングするには、IronPdf.Extensions.Mvc.CoreとIronPdfパッケージの両方が必要です。

Install-Package IronPdf.Extensions.Mvc.Core
class="products-download-section">
data-modal-id="trial-license-after-download">
class="product-image"> C# NuGet Library for PDF
class="product-info">

NuGetでインストール

data-original-title="クリックしてコピー">
class="copy-nuget-row">
Install-Package IronPdf.Extensions.Mvc.Core
class="copy-button">
class="nuget-link">nuget.org/packages/IronPdf.Extensions.Mvc.Core/

ビューをPDFにレンダリングする

ビューをPDFファイルに変換するには、ASP.NET Core Web App (Model-View-Controller)プロジェクトが必要です。

モデルクラスを追加

  • "Models"フォルダに移動。
  • "Person"という名前の新しいC#クラスファイルを作成。このクラスは個々のデータを表すモデルになります。 次のコードスニペットを使用してください。
:path=/static-assets/pdf/content-code-examples/how-to/cshtml-to-pdf-mvc-core-model.cs
namespace ViewToPdfMVCCoreSample.Models
{
    public class Person
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
    }
}
Namespace ViewToPdfMVCCoreSample.Models
	Public Class Person
		Public Property Id() As Integer
		Public Property Name() As String
		Public Property Title() As String
		Public Property Description() As String
	End Class
End Namespace
$vbLabelText   $csharpLabel

コントローラを編集

"Controllers"フォルダに移動し、"HomeController"ファイルを開きます。HomeControllerのみに変更を加え、"Persons"アクションを追加します。 以下のコードを参照してガイドにしてください:

以下のコードは、ChromePdfRendererクラスをインスタンス化し、IRazorViewRenderer、"Persons.cshtml"へのパス、RenderRazorViewToPdfメソッドに必要なデータを含むリストに渡します。 ユーザーはRenderingOptionsを使用して、カスタムテキストの追加、HTMLヘッダーとフッターを含む、カスタムマージンの定義、ページ番号の適用など、多様な機能にアクセスできます。

[{i:(The PDF document can be viewed in the browser using the following code: File(pdf.BinaryData, "application/pdf"). しかし、ブラウザでPDFを閲覧した後にダウンロードすると、PDFドキュメントが壊れます。)}]

using IronPdf.Extensions.Mvc.Core;
using Microsoft.AspNetCore.Mvc;
using System.Diagnostics;
using ViewToPdfMVCCoreSample.Models;

namespace ViewToPdfMVCCoreSample.Controllers
{
    public class HomeController : Controller
    {
        private readonly ILogger<HomeController> _logger;
        private readonly IRazorViewRenderer _viewRenderService;
        private readonly IHttpContextAccessor _httpContextAccessor;

        public HomeController(ILogger<HomeController> logger, IRazorViewRenderer viewRenderService, IHttpContextAccessor httpContextAccessor)
        {
            _logger = logger;
            _viewRenderService = viewRenderService;
            _httpContextAccessor = httpContextAccessor;
        }

        public IActionResult Index()
        {
            return View();
        }

        public async Task<IActionResult> Persons()
        {
            // Example list of persons
            var persons = new List<Person>
            {
                new Person { Name = "Alice", Title = "Mrs.", Description = "Software Engineer" },
                new Person { Name = "Bob", Title = "Mr.", Description = "Software Engineer" },
                new Person { Name = "Charlie", Title = "Mr.", Description = "Software Engineer" }
            };

            // Check if the request method is POST
            if (_httpContextAccessor.HttpContext.Request.Method == HttpMethod.Post.Method)
            {
                // Create a new PDF renderer
                ChromePdfRenderer renderer = new ChromePdfRenderer();

                // Render View to PDF document
                PdfDocument pdf = renderer.RenderRazorViewToPdf(_viewRenderService, "Views/Home/Persons.cshtml", persons);

                Response.Headers.Add("Content-Disposition", "inline");

                // Output PDF document
                return File(pdf.BinaryData, "application/pdf", "viewToPdfMVCCore.pdf");
            }

            return View(persons);
        }

        public IActionResult Privacy()
        {
            return View();
        }

        [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
        public IActionResult Error()
        {
            return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
        }
    }
}
using IronPdf.Extensions.Mvc.Core;
using Microsoft.AspNetCore.Mvc;
using System.Diagnostics;
using ViewToPdfMVCCoreSample.Models;

namespace ViewToPdfMVCCoreSample.Controllers
{
    public class HomeController : Controller
    {
        private readonly ILogger<HomeController> _logger;
        private readonly IRazorViewRenderer _viewRenderService;
        private readonly IHttpContextAccessor _httpContextAccessor;

        public HomeController(ILogger<HomeController> logger, IRazorViewRenderer viewRenderService, IHttpContextAccessor httpContextAccessor)
        {
            _logger = logger;
            _viewRenderService = viewRenderService;
            _httpContextAccessor = httpContextAccessor;
        }

        public IActionResult Index()
        {
            return View();
        }

        public async Task<IActionResult> Persons()
        {
            // Example list of persons
            var persons = new List<Person>
            {
                new Person { Name = "Alice", Title = "Mrs.", Description = "Software Engineer" },
                new Person { Name = "Bob", Title = "Mr.", Description = "Software Engineer" },
                new Person { Name = "Charlie", Title = "Mr.", Description = "Software Engineer" }
            };

            // Check if the request method is POST
            if (_httpContextAccessor.HttpContext.Request.Method == HttpMethod.Post.Method)
            {
                // Create a new PDF renderer
                ChromePdfRenderer renderer = new ChromePdfRenderer();

                // Render View to PDF document
                PdfDocument pdf = renderer.RenderRazorViewToPdf(_viewRenderService, "Views/Home/Persons.cshtml", persons);

                Response.Headers.Add("Content-Disposition", "inline");

                // Output PDF document
                return File(pdf.BinaryData, "application/pdf", "viewToPdfMVCCore.pdf");
            }

            return View(persons);
        }

        public IActionResult Privacy()
        {
            return View();
        }

        [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
        public IActionResult Error()
        {
            return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
        }
    }
}
Imports IronPdf.Extensions.Mvc.Core
Imports Microsoft.AspNetCore.Mvc
Imports System.Diagnostics
Imports ViewToPdfMVCCoreSample.Models

Namespace ViewToPdfMVCCoreSample.Controllers
	Public Class HomeController
		Inherits Controller

		Private ReadOnly _logger As ILogger(Of HomeController)
		Private ReadOnly _viewRenderService As IRazorViewRenderer
		Private ReadOnly _httpContextAccessor As IHttpContextAccessor

		Public Sub New(ByVal logger As ILogger(Of HomeController), ByVal viewRenderService As IRazorViewRenderer, ByVal httpContextAccessor As IHttpContextAccessor)
			_logger = logger
			_viewRenderService = viewRenderService
			_httpContextAccessor = httpContextAccessor
		End Sub

		Public Function Index() As IActionResult
			Return View()
		End Function

		Public Async Function Persons() As Task(Of IActionResult)
			' Example list of persons
'INSTANT VB NOTE: The local variable persons was renamed since Visual Basic will not allow local variables with the same name as their enclosing function or property:
			Dim persons_Conflict = New List(Of Person) From {
				New Person With {
					.Name = "Alice",
					.Title = "Mrs.",
					.Description = "Software Engineer"
				},
				New Person With {
					.Name = "Bob",
					.Title = "Mr.",
					.Description = "Software Engineer"
				},
				New Person With {
					.Name = "Charlie",
					.Title = "Mr.",
					.Description = "Software Engineer"
				}
			}

			' Check if the request method is POST
			If _httpContextAccessor.HttpContext.Request.Method = HttpMethod.Post.Method Then
				' Create a new PDF renderer
				Dim renderer As New ChromePdfRenderer()

				' Render View to PDF document
				Dim pdf As PdfDocument = renderer.RenderRazorViewToPdf(_viewRenderService, "Views/Home/Persons.cshtml", persons_Conflict)

				Response.Headers.Add("Content-Disposition", "inline")

				' Output PDF document
				Return File(pdf.BinaryData, "application/pdf", "viewToPdfMVCCore.pdf")
			End If

			Return View(persons_Conflict)
		End Function

		Public Function Privacy() As IActionResult
			Return View()
		End Function

		<ResponseCache(Duration := 0, Location := ResponseCacheLocation.None, NoStore := True)>
		Public Function [Error]() As IActionResult
			Return View(New ErrorViewModel With {.RequestId = If(Activity.Current?.Id, HttpContext.TraceIdentifier)})
		End Function
	End Class
End Namespace
$vbLabelText   $csharpLabel

RenderRazorViewToPdfメソッドを使用した後、さらなる改善と修正ができるPdfDocumentオブジェクトを受け取ります。 生成されたPDFにデジタル署名を追加したり、PDFをPDF/AまたはPDF/UA形式に変換するなどの柔軟性があります。また、PDFドキュメントを必要に応じてマージおよび分割することができます。 さらに、このライブラリを使用すると、PDFファイルへのページ回転、注釈またはブックマークの挿入、ユニークなウォーターマークの印刷が可能です。

ビューを追加

  • 新しく追加されたPersonアクションを右クリックし、「ビューを追加」を選択します。

Personsアクションを右クリック

  • 新しいスキャフォールドアイテムには「Razor View」を選んでください。

スキャフォールドを選択

  • 「リスト」テンプレートと「Person」モデルクラスを選択します。

ビューを追加

これにより、「Persons」という名前の.cshtmlファイルが作成されます。

  • "Views"フォルダ -> "Home"フォルダ -> "Persons.cshtml"ファイルに移動します。

"Persons"アクションを呼び出すボタンを追加するには、以下のコードを使用します:

@using (Html.BeginForm("Persons", "Home", FormMethod.Post))
{
    <input type="submit" value="Print Person" />
}
@using (Html.BeginForm("Persons", "Home", FormMethod.Post))
{
    <input type="submit" value="Print Person" />
}
HTML

上部ナビゲーションバーにセクションを追加

  • 同じ"Views"フォルダに移動し、「Shared」フォルダ -> _Layout.cshtmlに移動します。 "Home"の後に「Person」ナビゲーション項目を配置します。

asp-action属性の値が、ファイル名(この場合は"Persons")と正確に一致することを確認します。

<header>
    <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
        <div class="container-fluid">
            <a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">ViewToPdfMVCCoreSample</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
                    aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
                <ul class="navbar-nav flex-grow-1">
                    <li class="nav-item">
                        <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Persons">Person</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
</header>
<header>
    <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
        <div class="container-fluid">
            <a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">ViewToPdfMVCCoreSample</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
                    aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
                <ul class="navbar-nav flex-grow-1">
                    <li class="nav-item">
                        <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Persons">Person</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
</header>
HTML

Program.csファイルを編集

依存性注入(DI)コンテナにIHttpContextAccessorIRazorViewRendererインターフェースを登録します。 参照用に以下のコードを確認してください。

using IronPdf.Extensions.Mvc.Core;
using Microsoft.AspNetCore.Mvc.ViewFeatures;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();

builder.Services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
builder.Services.AddSingleton<ITempDataProvider, CookieTempDataProvider>();

// Register IRazorViewRenderer here
builder.Services.AddSingleton<IRazorViewRenderer, RazorViewRenderer>();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
    app.UseExceptionHandler("/Home/Error");
    // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
    app.UseHsts();
}

app.UseHttpsRedirection();
app.UseStaticFiles();

app.UseRouting();

app.UseAuthorization();

app.MapControllerRoute(
    name: "default",
    pattern: "{controller=Home}/{action=Index}/{id?}");

app.Run();
using IronPdf.Extensions.Mvc.Core;
using Microsoft.AspNetCore.Mvc.ViewFeatures;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddControllersWithViews();

builder.Services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
builder.Services.AddSingleton<ITempDataProvider, CookieTempDataProvider>();

// Register IRazorViewRenderer here
builder.Services.AddSingleton<IRazorViewRenderer, RazorViewRenderer>();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
    app.UseExceptionHandler("/Home/Error");
    // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
    app.UseHsts();
}

app.UseHttpsRedirection();
app.UseStaticFiles();

app.UseRouting();

app.UseAuthorization();

app.MapControllerRoute(
    name: "default",
    pattern: "{controller=Home}/{action=Index}/{id?}");

app.Run();
Imports IronPdf.Extensions.Mvc.Core
Imports Microsoft.AspNetCore.Mvc.ViewFeatures

Private builder = WebApplication.CreateBuilder(args)

' Add services to the container.
builder.Services.AddControllersWithViews()

builder.Services.AddSingleton(Of IHttpContextAccessor, HttpContextAccessor)()
builder.Services.AddSingleton(Of ITempDataProvider, CookieTempDataProvider)()

' Register IRazorViewRenderer here
builder.Services.AddSingleton(Of IRazorViewRenderer, RazorViewRenderer)()

Dim app = builder.Build()

' Configure the HTTP request pipeline.
If Not app.Environment.IsDevelopment() Then
	app.UseExceptionHandler("/Home/Error")
	' The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
	app.UseHsts()
End If

app.UseHttpsRedirection()
app.UseStaticFiles()

app.UseRouting()

app.UseAuthorization()

app.MapControllerRoute(name:= "default", pattern:= "{controller=Home}/{action=Index}/{id?}")

app.Run()
$vbLabelText   $csharpLabel

プロジェクトを実行する

プロジェクトを実行し、PDFドキュメントを生成する方法を示します。

ASP.NET Core MVCプロジェクトを実行する

ASP.NET Core MVCプロジェクトをダウンロード

このガイドの完全なコードをダウンロードできます。これは圧縮ファイルとして提供され、Visual StudioでASP.NET Core Web App (Model-View-Controller)プロジェクトとして開くことができます。

ASP.NET Core MVCサンプルプロジェクトをダウンロード

次に何ができるのかを見てみましょうか? 私たちのチュートリアルページをご覧ください: PDFの変換

よくある質問

ASP.NET Core MVCでCSHTMLをPDFに変換する方法は?

IronPDFの`RenderRazorViewToPdf`メソッドを使用して、ASP.NET Core MVCプロジェクト内でCSHTMLファイルをPDFに変換することができます。

ASP.NET Core MVCプロジェクトでPDF生成を設定するために必要な手順は何ですか?

PDF生成を設定するには、NuGetを介してIronPDFライブラリをダウンロードし、モデルクラスを作成し、HomeControllerを編集して`RenderRazorViewToPdf`メソッドを使用し、'Program.cs'ファイルで`IHttpContextAccessor`と`IRazorViewRenderer`の依存性の注入を設定します。

ASP.NET CoreでのPDF変換になぜ依存性の注入が必要なのですか?

`IHttpContextAccessor`と`IRazorViewRenderer`の依存性の注入は、ビューをPDFとして正しくレンダリングするために必要であり、Razorビューレンダリングコンテキストが正しく確立されることを保証します。

ASP.NET Core MVCでビューを変換する際にPDF出力をカスタマイズできますか?

はい、IronPDFを使用すると、`RenderRazorViewToPdf`メソッド内でヘッダー、フッター、マージンなどの設定を調整することで、PDFの出力をカスタマイズできます。

`RenderRazorViewToPdf`メソッドのPDF変換における役割は何ですか?

`RenderRazorViewToPdf`メソッドは、Razor ViewsをPDF文書に変換するために不可欠であり、PDFの外観や内容をカスタマイズするオプションを提供します。

ASP.NET Core MVCプロジェクトがPDF変換をサポートしていることを確認するにはどうすればいいですか?

IronPdf.Extensions.Mvc.Coreパッケージをインストールし、プロジェクト内で必要なサービスとモデルを構成することで、プロジェクトがPDF変換をサポートしていることを確認します。

ビューから生成されたPDFにインタラクティブな要素を追加することは可能ですか?

はい、IronPDFを使用してPDFを生成した後、ドキュメント内のユーザーインタラクションを強化するために、フォームやリンク、ブックマークなどのインタラクティブな要素を追加できます。

ビューをPDFに変換するためのサンプルプロジェクトはどこにありますか?

ビューをPDFに変換するための完全なセットアップを示すガイドに提供されたサンプルプロジェクトをダウンロードできます。

ASP.NET Core MVCプロジェクトにIronPDFをどのようにインストールしますか?

NuGetパッケージマネージャーを使用して、次のコマンドでIronPDFをインストールします: Install-Package IronPdf.Extensions.Mvc.Core

IronPDF は、CSHTML ビューを PDF に変換する際に .NET 10 と互換性がありますか?

はい — IronPDF は .NET 10 と完全に互換性があり、追加の構成なしで `RenderRazorViewToPdf` などの既存の API を使用して CSHTML ビューを PDF にレンダリングすることをサポートしています。

Chaknith Bin
ソフトウェアエンジニア
ChaknithはIronXLとIronBarcodeに取り組んでいます。彼はC#と.NETの深い専門知識を持ち、ソフトウェアの改善や顧客サポートに貢献しています。ユーザーとの対話から得られる洞察が、より良い製品、ドキュメント、および全体的な経験に寄与しています。
によってレビュー

A PHP Error was encountered

Severity: Warning

Message: Illegal string offset 'name'

Filename: sections/author_component.php

Line Number: 70

Backtrace:

File: /var/www/ironpdf.com/application/views/main/sections/author_component.php
Line: 70
Function: _error_handler

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 63
Function: view

File: /var/www/ironpdf.com/application/views/products/sections/three_column_docs_page_structure.php
Line: 64
Function: main_view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/views/products/how-to/index.php
Line: 2
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 552
Function: view

File: /var/www/ironpdf.com/application/controllers/Products/Howto.php
Line: 31
Function: render_products_view

File: /var/www/ironpdf.com/index.php
Line: 292
Function: require_once

">

A PHP Error was encountered

Severity: Warning

Message: Illegal string offset 'title'

Filename: sections/author_component.php

Line Number: 84

Backtrace:

File: /var/www/ironpdf.com/application/views/main/sections/author_component.php
Line: 84
Function: _error_handler

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 63
Function: view

File: /var/www/ironpdf.com/application/views/products/sections/three_column_docs_page_structure.php
Line: 64
Function: main_view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/views/products/how-to/index.php
Line: 2
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 552
Function: view

File: /var/www/ironpdf.com/application/controllers/Products/Howto.php
Line: 31
Function: render_products_view

File: /var/www/ironpdf.com/index.php
Line: 292
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Illegal string offset 'comment'

Filename: sections/author_component.php

Line Number: 85

Backtrace:

File: /var/www/ironpdf.com/application/views/main/sections/author_component.php
Line: 85
Function: _error_handler

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 63
Function: view

File: /var/www/ironpdf.com/application/views/products/sections/three_column_docs_page_structure.php
Line: 64
Function: main_view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/views/products/how-to/index.php
Line: 2
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 88
Function: view

File: /var/www/ironpdf.com/application/libraries/Render.php
Line: 552
Function: view

File: /var/www/ironpdf.com/application/controllers/Products/Howto.php
Line: 31
Function: render_products_view

File: /var/www/ironpdf.com/index.php
Line: 292
Function: require_once