URL を PDF に変換 WebのURLからPDFへのレンダリングは、fromUrlメソッドにURLを供給するのと同じくらい簡単です。 これは、PDFドキュメントをエクスポートしたり、さらにPDFドキュメントを拡張したりできるPDFオブジェクトを返します。 IronPDFを使ってウェブページをPDFに変換する追加情報については、IronPDFのHTMLからPDFへの変換ガイドをご覧ください。 // Import necessary namespace using IronPdf; class Program { static void Main() { // Define the URL of the web page you want to convert to a PDF var url = "https://example.com"; // Create an instance of IronPdf.HtmlToPdf var renderer = new HtmlToPdf(); // Render the URL to a PDF document // The fromUrl method takes the web page URL and returns a PdfDocument object PdfDocument pdf = renderer.RenderUrlAsPdf(url); // Export the PDF document to a file // Specify the file path where the PDF will be saved pdf.SaveAs("WebPageToPdf.pdf"); // Output success message System.Console.WriteLine("Web page has been successfully converted to PDF."); } } // Import necessary namespace using IronPdf; class Program { static void Main() { // Define the URL of the web page you want to convert to a PDF var url = "https://example.com"; // Create an instance of IronPdf.HtmlToPdf var renderer = new HtmlToPdf(); // Render the URL to a PDF document // The fromUrl method takes the web page URL and returns a PdfDocument object PdfDocument pdf = renderer.RenderUrlAsPdf(url); // Export the PDF document to a file // Specify the file path where the PDF will be saved pdf.SaveAs("WebPageToPdf.pdf"); // Output success message System.Console.WriteLine("Web page has been successfully converted to PDF."); } } ' Import necessary namespace Imports IronPdf Friend Class Program Shared Sub Main() ' Define the URL of the web page you want to convert to a PDF Dim url = "https://example.com" ' Create an instance of IronPdf.HtmlToPdf Dim renderer = New HtmlToPdf() ' Render the URL to a PDF document ' The fromUrl method takes the web page URL and returns a PdfDocument object Dim pdf As PdfDocument = renderer.RenderUrlAsPdf(url) ' Export the PDF document to a file ' Specify the file path where the PDF will be saved pdf.SaveAs("WebPageToPdf.pdf") ' Output success message System.Console.WriteLine("Web page has been successfully converted to PDF.") End Sub End Class $vbLabelText $csharpLabel HTMLからPDFへの変換ガイドで詳細をご覧ください。 関連ドキュメントリンク Githubで見る 関連チュートリアル 関連ハウツーガイド クラスドキュメンテーション 言語パックを入手 IronPDF DLLをダウンロード Report an Issue on this page 準備はいいですか? バージョン: 2025.11 ただ今リリースされました 無料npmインストール ライセンスを見る