IronSoftware
  • Products
    for .NET Java
    Create, read, and edit PDFs
    for .NET
    Image to text in 127 languages
    for .NET
    Read and write QR & Barcodes
    for .NET
    Edit Excel & CSV Files.
    No Office Interop required
    for .NET
    Extract structured data from websites
    5 for the Price of 2 All 5 .NET product licenses from $1498 Save 60% with Iron Suite Iron Suites - Donate $50
  • Open Source
    for .NET
    System.Drawing.Common Replacement
  • About Us
  • Contact Us

205 N. Michigan Ave. Chicago, IL 60611, USA +1 (312) 500-3060

Join Iron Slack

  • Home
  • Licensing
  • EULA
  • Support & Update Extensions
  • License Upgrades
  • Start 30-Day Trial
  • Features
  • Get Started
  • Code Examples
  • Tutorials
  • How-Tos
  • Troubleshooting
  • Product Updates
  • API Reference
  • Search
  • Free NuGet Download
IronPDF Library for C# IronPDF Library for C#
  • IronPDF for Java
  • Home
  • Licensing
    • Licensing
    • EULA
    • Support & Update Extensions
    • License Upgrades
    • Start 30-Day Trial
  • Features
  • Docs
    • Search
    • Get Started
    • Code Examples
    • Tutorials
    • How-Tos
    • Troubleshooting
    • Product Updates
    • API Reference
    • Search
  • Search
  • Free NuGet Download Total downloads: 5,522,841
Message's icon
IronPDF
Code Examples
  1. IronPDF
  2. Code Examples
  3. Website and System Login in PDF
IronPDF
Free for development from NuGet

Install with NuGet nuget.org/packages/IronPdf

PM > Install-Package IronPdf

Explore the Docs

  • Get Started
  • Features
  • Code Examples
    • HTML to PDF
    • Generating PDFs in C#
    • Editing PDFs in C#
    • Compatibility
      • Install & Deploy IronPDF
      • License Keys
      • Setup on macOS
      • Setup on Docker
      • Setup on Linux
      • Setup on Azure
      • Setup on AWS
      • Coding with VB.NET
      • Coding with F#
      • Platform-Specific NuGet Packages
      • Use Windows Installer
      • Host your own IronPDF Container
    • Generating PDFs
      • PDF from HTML File
      • PDF from HTML String
      • PDF from URL
      • PDF from ASPX Pages
      • PDF from Razor View
      • PDF from ASP.NET MVC
      • Convert XML to PDF
      • Generate PDF Reports
      • Work with PDF Images and CSS
      • Website & System Logins
      • Create PDFs in MAUI
      • Create PDFs in Blazor Servers
      • Async and Multithreading
      • Chrome PDF Rendering Engine
    • Formatting PDFs
      • Debug HTML with Chrome
      • Custom and Responsive CSS
      • Use JavaScript with HTML to PDF
      • Set Fonts
      • Use SVG Graphics
      • Support UTF-8 and International Languages
      • Accessible PDFs & Section 508
      • Export PDF/A Format Docs in C#
      • Page Breaks
      • Embed Images with DataURIs
      • Embed Images from Azure Blob Storage
    • Editing PDFs
      • Merge or Split PDFs
      • Save & Export PDF Documents
      • Load & Export PDFs to Memory
      • Rotate Text and Pages
      • Signing PDFs
      • Print PDFs Programmatically
      • View PDFs in a .NET Application
      • Read PDF Documents in C#
      • Parse PDFs in C#
      • Add Cover Page to PDF
      • Flatten PDF Images
      • Add Stamp to PDFs in C#
      • Split Multipage PDF
      • Add PDF Outlines and Bookmarks
      • Set PDF Passwords and Permissions
    • Contacting Technical Support
      • How to Make an Engineering Support Request for IronPDF
      • Getting the Best Support for IronPDF
    • Deployment
      • Visual C++ Redistributable for Visual Studio
      • AWS Lambda / Amazon Linux 2
      • IronCefSubprocess
      • Debugging Azure Functions Project on Local Machine
      • Windows Nano Server / Servercore in .Net6 do not support System.Drawing
      • IronPDF Runtimes Folder
      • Adding IronPDF to a software program installer
      • Red Hat Enterprise Linux (RHEL) support
    • Common Questions
      • Bootstrap / Flex / CSS
      • Azure Plans and Tiers
      • Initial render is slow
      • Font Kerning
      • Pixel Perfect HTML Formatting
      • What version of IronPDF should I use?
      • IronPDF Package Size
      • Fonts
      • Quick IronPDF Troubleshooting
      • IronPDF Performance Assistance
      • Azure Log Files
      • AWS Log Files
      • Render Delay & Timeout
      • Large Output Files Using ImageToPDF
      • Memory Leak in IronPDF
      • Log4j
      • Convert PDF to Base64
      • IronPDF - Security CVE
      • IronPDF 'using' Declaration
      • IronPDF - _blank hyperlinks in a PDF open in same browser tab
      • PDF File Versions
      • IronPdf.Slim
      • IronPdf.Linux
    • Troubleshooting Guides
      • Apply a license key in IronPDF
      • Azure Blob Storage
      • Blazor Server / WebAssembly (WASM)
      • Digital Signatures
      • Headers/Footers and Page Breaks
      • International Languages and CMJK
      • IronPdf and IIS
      • Kerberos
      • MetaData Visibility
      • PDF Viewer
      • Print From Network Printer
      • Rasterize to Image using MemoryStream
      • Render view to string
      • System.Drawing.Common Alternatives (.NET 7 & Non-Windows)
      • Table Headers
    • Exception Messages
      • Access to the path 'Global-IronSoftwareDeploymentGlobal' is denied
      • Error while deploying Chrome dependencies
      • Error while deploying Pdfium dependencies
      • Failed to deploy NuGet package
      • GPU process isn't usable
      • Invalid CefExecuteProcess return code of 0
      • IronPDF can not open / parse a specific PDF file
      • IronPDF Native Exception
      • IronPdfAssemblyVersionMismatchException
      • Network service crashed, restarting service
      • No function was found with the name SetLogEvent with error code (127)
      • Registry is not supported on this platform
      • Timeout while rendering PDF
      • Unhandled case for AdaptiveRenderEngine
    • Product Release Notes
      • IronPDF v2021.12.4401
      • IronPDF v2022.11.10347
      • IronPDF v2022.9.9056
      • IronPDF v2022.8.8138
      • IronPDF v2022.8.7894
      • IronPDF v2022.7.6986
      • IronPDF v2022.6.6115
      • IronPDF v2022.5.5596
      • IronPDF v2022.5.5629
      • IronPDF v2021.12.4495
      • IronPDF v2022.4.5455
      • IronPDF v2022.3.5084
      • IronPDF v2022.4.5575
      • IronPDF v2022.1.4599
      • IronPDF v2022.2.4887
      • IronPDF v2021.11.4257
      • PDF.Core
    • Changelog
    • Milestones
    • Milestone: Chrome Rendering
    • Milestone: PDFium DOM
    • Milestone: Compatibility
  • API Reference
HTML to PDF HTML Files to PDF URL to a PDF Rendering Settings for HTML to PDF ASPX Pages to PDF ASPX To PDF Settings Images To PDF RTF to PDF TIFF to PDF with Multi-Page Support Async PDF Generation MultithreadedPDF Generation Parallel PDF Generation JavaScript in HTML To PDF Execute Custom JavaScript JavaScript Message Listener Angular.JS to PDF Rendering Charts and Graphs in PDFs Custom Fonts in HTML to PDF Add Barcodes in HTML to PDF Set Temp PDF File Path Embedding Bitmaps and Images Website & System Logins
Add Classic Text Headers & Footers Add HTML Headers & Footers Add Headers/Footers on Specific Pages Page Numbers and Page Breaks Attach a Cover Page PDF Forms Responsive HTML to PDF Unicode & UTF-8 Support Backgrounds & Foregrounds Custom PDF Size Portrait & Landscape Orientation Set Custom Margins Set to Grayscale
PDF Compression Passwords, Security & Metadata Editing PDFs Joining Two or More PDFs Rasterize a PDF to Images Split a PDF and Extract Pages Copying Pages between PDF Files Remove Specific PDF Pages Outlines & Bookmarks Annotations Digital Signatures PDF Encryption & Decryption Stamping New Content Adding HTML Content Efficiently Watermarking Read PDF Files in C# Paper Printing PDFs Text Find and Replace Add Attachments

Website & System Logins

using IronPdf;
using System;
using System.IO;

var uri = new Uri("http://localhost:51169/Invoice");
var urlToPdf = new ChromePdfRenderer
{
	RenderingOptions = new ChromePdfRenderOptions()
	{
		MarginTop = 50,
		MarginBottom = 50,
		TextHeader = new TextHeaderFooter()
		{
			CenterText = "{pdf-title}",
			DrawDividerLine = true,
			FontSize = 16
		},
		TextFooter = new TextHeaderFooter()
		{
			LeftText = "{date} {time}",
			RightText = "Page {page} of {total-pages}",
			DrawDividerLine = true,
			FontSize = 14
		},
		CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print
	},

	// setting login credentials to bypass basic authentication
	LoginCredentials = new IronPdf.ChromeHttpLoginCredentials
	{
		NetworkUsername = "testUser",
		NetworkPassword = "testPassword"
	}
};

var pdf = urlToPdf.RenderUrlAsPdf(uri);
pdf.SaveAs(Path.Combine(Directory.GetCurrentDirectory(), "UrlToPdfExample2.Pdf"));
Imports IronPdf
Imports System
Imports System.IO

Private uri = New Uri("http://localhost:51169/Invoice")
Private urlToPdf = New ChromePdfRenderer With {
	.RenderingOptions = New ChromePdfRenderOptions() With {
		.MarginTop = 50,
		.MarginBottom = 50,
		.TextHeader = New TextHeaderFooter() With {
			.CenterText = "{pdf-title}",
			.DrawDividerLine = True,
			.FontSize = 16
		},
		.TextFooter = New TextHeaderFooter() With {
			.LeftText = "{date} {time}",
			.RightText = "Page {page} of {total-pages}",
			.DrawDividerLine = True,
			.FontSize = 14
		},
		.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print
	},
	.LoginCredentials = New IronPdf.ChromeHttpLoginCredentials With {
		.NetworkUsername = "testUser",
		.NetworkPassword = "testPassword"
	}
}

Private pdf = urlToPdf.RenderUrlAsPdf(uri)
pdf.SaveAs(Path.Combine(Directory.GetCurrentDirectory(), "UrlToPdfExample2.Pdf"))
Install-Package IronPdf

Website & System Logins

Most ASP.NET applications support network authentication which is more reliable than html form posting. For more examples about IronPDF and Authentication Forms, please see: Render PDFs Behind System Logins article.

Related Docs Links

Ready to get started? Version: 2023.3 just released

Start for Free Total downloads: 5,522,841
View Licenses >
Try IronPDF for Free
Get Set Up in 5 Minutes
C# NuGet Library for PDF
Install with NuGet
Version: 2023.3
Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPdf"
  3. Select the package and install
C# PDF DLL
Download DLL
Version: 2023.3
Download Now
or download Windows Installer here.
  1. Download and unzip IronPDF to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPdf.dll"
Licenses from $749

Have a question? Get in touch with our development team.

Now that you’ve downloaded IronPDF
Want to deploy IronPDF to a live project for FREE?
Not ready to buy?

Want to deploy IronPDF to a live project for FREE?

What’s included?
30 days of fully-functional product
Test and share in a live environment
No watermarks in production
Get your free 30-day Trial Key instantly.
Thank you.
If you'd like to speak to our licensing team:
Schedule a call
Have a question? Get in touch with our development team.
No credit card or account creation required
Your Trial License Key has been emailed to you.
Not ready to buy?
Thank you.
View your license options:
Thank you.
If you'd like to speak to our licensing team:
View Licensing
Schedule a call
Have a question? Get in touch with our development team.
Have a question? Get in touch with our development team.
Want to deploy IronPDF to a live project for FREE?
Not ready to buy?

Want to deploy IronPDF to a live project for FREE?

What’s included?
30 days of fully-functional product
Test and share in a live environment
No watermarks in production
Get your free 30-day Trial Key instantly.
Thank you.
If you'd like to speak to our licensing team:
Schedule a call
Have a question? Get in touch with our development team.
No credit card or account creation required
Your Trial License Key has been emailed to you.
Not ready to buy?
Download IronPDF free to apply
your Trial Licenses Key
Thank you.
If you'd like to speak to our licensing team:
Install with NuGet View Licensing
Schedule a call
Licenses from $749. Have a question? Get in touch.
Have a question? Get in touch with our development team.
Free 30-Day Trial Key

Fully-functional product, get the key instantly

IronPDF for .NET

When you need your PDF to look like HTML, fast.

Search

Documentation

  • Code Examples
  • API Reference
  • How-Tos
  • Features
  • Blog
  • Credits
  • Product Brochure

Tutorials

  • Get Started
  • HTML to PDF
  • Editing PDFs in C#
  • Debug HTML with Chrome
  • ASPX to PDF
  • VB.NET to PDF

Licensing

  • Buy a License
  • Support Extensions
  • Resellers
  • License Keys
  • EULA

Try IronPDF Free

  • Download on NuGet
  • Download DLL

  • Download Windows Installer

  • 30-Day Trial License

When you need your PDF to look like HTML, fast.

Tesseract 5 OCR in the languages you need, We support 127+.

When you need to read, write, and style, QR & Barcodes, fast.

The Excel API you need, without the Office Interop hassle.

The power you need to scrape & output clean, structured data.

The complete .NET Suite for your office.

  • IRONSUITE
  • |
  • IRONPDF
  • IRONOCR
  • IRONBARCODE
  • IRONXL
  • IRONWEBSCRAPER
IronSoftware
205 N. Michigan Ave. Chicago, IL 60611 USA +1 (312) 500-3060
  • About Us
  • News
  • Careers
  • Contact Us
  • Join Iron Slack

Supporting Teamseas

Copyright © Iron Software LLC 2013-2023

  • Terms
  • Privacy

Thank you!

Your license key has been delivered to the email provided. Contact us

24-Hour Upgrade Offer:

Save 50% on a
Professional Upgrade

Go Professional to cover 10 developers
and unlimited projects.

hours

:

minutes

:

seconds

Upgrade to Professional

Upgrade

Professional

$600 USD

$299 USD


  • 10 developers
  • 10 locations
  • 10 projects
TODAY ONLY
Iron Suite

5 .NET Products for the Price of 2

IronPDF IronOCR IronXL IronBarcode IronWebscraper

Total Suite Value:

$7,192 USD

Upgrade price

TODAY
ONLY

$499 USD

After 24 Hrs

$1,098 USD