Website & System Logins

For rendering web pages located behind HTML forms and password-protected website directories into PDF files, the best practice is to forgo programmatic authentication and form submissions in favor of rendering the markup directly from local files or from HTML strings, as explained on this page. However, in situations where accessing the source code of the web pages to be converted manually is cumbersome, time-intensive, or non-feasible, IronPDF can make rendering PDF content from these restricted areas easy and painless.

To convert web pages located behind password-protected directories, specify a set of valid network credentials for IronPDF's PDF Renderer to use with a ChromeHttpLoginCredentials object. Afterward, pass a reference to the ChromeHttpLoginCredentials along with the URL of the password-protected webpage to PdfDocument.renderUrlAsPdf:

PdfDocument.renderUrlAsPdf(restrictedUrl, loginCredentials).saveAs(Paths.get("output.pdf"));
JAVA