Click or drag to resize
Pdf Library for .NET

HtmlToPdfAuthenticationOptions Class

Holds the credentials sent to a web server that protects the converted page with HTTP authentication. Reached through Authentication; the credentials are used only when the server challenges the request.
Inheritance Hierarchy
SystemObject
  SelectPdf.UniversalHtmlToPdfAuthenticationOptions

Namespace: SelectPdf.Universal
Assembly: SelectPdf.HtmlToPdf.Universal (in SelectPdf.HtmlToPdf.Universal.dll) Version: 26.4
Syntax
public class HtmlToPdfAuthenticationOptions

The HtmlToPdfAuthenticationOptions type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyPassword Gets or sets the password sent to the web server when it requires HTTP authentication.
Public propertyUsername Gets or sets the user name sent to the web server when it requires HTTP authentication.
Top
Example
HtmlToPdf converter = new HtmlToPdf();
converter.Options.Authentication.Username = "user";
converter.Options.Authentication.Password = "secret";
PdfDocument doc = converter.ConvertUrl("https://secure.example.com/report");
doc.Save("out.pdf");
doc.Close();
See Also