Cookies This code demonstrates how to use IronPDF to authenticate a request using network credentials and apply cookies for rendering a webpage as a PDF. ChromePdfRenderer: Used for rendering HTML content into PDF format. RequestContexts.Global: Ensures that the PDF rendering maintains the same browsing context for lifetime of the process, enabling the use of cookies and authentication across requests. ChromeHttpLoginCredentials: Provides network authentication when accessing web pages that require login credentials. ApplyCookies: Applies the specified cookies and credentials to the HTTP request, vital for rendering secure pages. uri: Represents the web address of a page that needs to be rendered into a PDF and typically requires user authentication. In this example, it points to a locally hosted webpage. This setup is particularly advantageous when rendering PDFs from authenticated pages, such as invoices, reports, or dashboards that require user authentication. Learn to Apply Cookies in PDF Rendering with IronPDF. View on GitHub Code https://github.com/iron-software/IronPdf.Examples/tree/main/examples/cookies Download ZIP Related Tutorial Related How-To Guide Class Documentation Get Language Packs Download IronPDF DLL Report an Issue on this page Ready to Get Started? Nuget Downloads 16,425,128 | Version: 2025.11 just released Free NuGet Download Total downloads: 16,425,128 View Licenses
All your questions are answered to make sure you have all the information you need. (No commitment whatsoever.)