# WebToPDFConvertParams Class

> Parameters that control web/HTML-to-PDF conversion.

- Product: Adobe PDF Library 21
- Language: .NET Framework
- Version: APDFL21.0.0PlusP1e
- HTML page: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/WebToPDFConvertParams
- Version index: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/llms.txt

```csharp
class WebToPDFConvertParams : SystemIDisposable
```

**Namespace:** `Datalogics::PDFL`

**Inherits from:** `SystemIDisposable`

## Description

Parameters that control web/HTML-to-PDF conversion. Configure the target page geometry, viewport, image handling, and behavior on this object, then pass it to a web-to-PDF conversion call. The enum-valued settings (viewport preset, page size, page orientation, image compression, and downsampling resolution) take named values rather than raw integers. Safe to construct and configure on any platform; conversion itself runs only where the WebToPDF plugin is supported.

**Referenced by:** [`Document`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Document.md), [`WebToPDFConvertParams`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/WebToPDFConvertParams.md)

**Uses types:** [`WebDownsamplingDPI`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/enum/WebDownsamplingDPI.md), [`WebImageCompression`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/enum/WebImageCompression.md), [`WebPageOrientation`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/enum/WebPageOrientation.md), [`WebPageSize`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/enum/WebPageSize.md), [`WebToPDFConvertParams`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/WebToPDFConvertParams.md), [`WebViewportPreset`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/enum/WebViewportPreset.md)

## Constructors

### WebToPDFConvertParams

```csharp
Datalogics.PDFL.WebToPDFConvertParams.WebToPDFConvertParams()
```

*constructor*

### WebToPDFConvertParams

```csharp
Datalogics.PDFL.WebToPDFConvertParams.WebToPDFConvertParams(WebToPDFConvertParams other)
```

*constructor*

**Parameters**

- `other` ([`WebToPDFConvertParams`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/WebToPDFConvertParams.md))

## Properties

### CustomPageHeight

```csharp
double Datalogics.PDFL.WebToPDFConvertParams.CustomPageHeight { get; }
```

### CustomPageWidth

```csharp
double Datalogics.PDFL.WebToPDFConvertParams.CustomPageWidth { get; }
```

### CustomViewportHeight

```csharp
int Datalogics.PDFL.WebToPDFConvertParams.CustomViewportHeight { get; }
```

### CustomViewportWidth

```csharp
int Datalogics.PDFL.WebToPDFConvertParams.CustomViewportWidth { get; }
```

### DisplayHeaderFooter

```csharp
bool Datalogics.PDFL.WebToPDFConvertParams.DisplayHeaderFooter { get; set; }
```

### DownsamplingDPI

```csharp
WebDownsamplingDPI Datalogics.PDFL.WebToPDFConvertParams.DownsamplingDPI { get; set; }
```

### EnableVerboseLogging

```csharp
bool Datalogics.PDFL.WebToPDFConvertParams.EnableVerboseLogging { get; set; }
```

### GenerateTaggedPDF

```csharp
bool Datalogics.PDFL.WebToPDFConvertParams.GenerateTaggedPDF { get; set; }
```

### ImageCompression

```csharp
WebImageCompression Datalogics.PDFL.WebToPDFConvertParams.ImageCompression { get; set; }
```

### MarginBottom

```csharp
double Datalogics.PDFL.WebToPDFConvertParams.MarginBottom { get; }
```

### MarginLeft

```csharp
double Datalogics.PDFL.WebToPDFConvertParams.MarginLeft { get; }
```

### MarginRight

```csharp
double Datalogics.PDFL.WebToPDFConvertParams.MarginRight { get; }
```

### MarginTop

```csharp
double Datalogics.PDFL.WebToPDFConvertParams.MarginTop { get; }
```

### PageOrientation

```csharp
WebPageOrientation Datalogics.PDFL.WebToPDFConvertParams.PageOrientation { get; set; }
```

### PageSize

```csharp
WebPageSize Datalogics.PDFL.WebToPDFConvertParams.PageSize { get; set; }
```

### PreferCSSPageSize

```csharp
bool Datalogics.PDFL.WebToPDFConvertParams.PreferCSSPageSize { get; set; }
```

### PrintBackground

```csharp
bool Datalogics.PDFL.WebToPDFConvertParams.PrintBackground { get; set; }
```

### Scale

```csharp
double Datalogics.PDFL.WebToPDFConvertParams.Scale { get; set; }
```

### TimeoutSeconds

```csharp
int Datalogics.PDFL.WebToPDFConvertParams.TimeoutSeconds { get; set; }
```

### ViewportSize

```csharp
WebViewportPreset Datalogics.PDFL.WebToPDFConvertParams.ViewportSize { get; set; }
```

## Methods

### Dispose

```csharp
void Datalogics.PDFL.WebToPDFConvertParams.Dispose()
```

**Returns:** `void`

### SetCustomPageSize

```csharp
void Datalogics.PDFL.WebToPDFConvertParams.SetCustomPageSize(double width_pts, double height_pts)
```

**Parameters**

- `width_pts` (`double`)
- `height_pts` (`double`)

**Returns:** `void`

Explicit page size in points (1 pt = 1/72 in). Used only when the page size is Custom.

### SetCustomViewport

```csharp
void Datalogics.PDFL.WebToPDFConvertParams.SetCustomViewport(int width, int height)
```

**Parameters**

- `width` (`int`)
- `height` (`int`)

**Returns:** `void`

Explicit viewport size in pixels. Used only when the viewport preset is Custom.

### SetMargins

```csharp
void Datalogics.PDFL.WebToPDFConvertParams.SetMargins(double top, double right, double bottom, double left)
```

**Parameters**

- `top` (`double`)
- `right` (`double`)
- `bottom` (`double`)
- `left` (`double`)

**Returns:** `void`

Page margins in inches, given as top, right, bottom, left.
