# WebToPDFConvertParams Class

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

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

```java
class WebToPDFConvertParams
```

**Namespace:** `com::datalogics::PDFL`

## 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/Java/APDFL21.0.0PlusP1e/class/Document.md), [`WebToPDFConvertParams`](https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1e/class/WebToPDFConvertParams.md)

**Uses types:** [`WebToPDFConvertParams`](https://docs.datalogics.com/apdfl21/Java/APDFL21.0.0PlusP1e/class/WebToPDFConvertParams.md)

## Constructors

### WebToPDFConvertParams

```java
com.datalogics.PDFL.WebToPDFConvertParams.WebToPDFConvertParams()
```

*constructor*

### WebToPDFConvertParams

```java
com.datalogics.PDFL.WebToPDFConvertParams.WebToPDFConvertParams(WebToPDFConvertParams other)
```

*constructor*

**Parameters**

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

## Methods

### delete

```java
synchronized void com.datalogics.PDFL.WebToPDFConvertParams.delete(Boolean disposing)
```

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.WebToPDFConvertParams.delete()
```

**Returns:** `synchronized void`

### finalize

```java
void com.datalogics.PDFL.WebToPDFConvertParams.finalize()
```

*protected*

**Returns:** `void`

### getCustomPageHeight

```java
double com.datalogics.PDFL.WebToPDFConvertParams.getCustomPageHeight()
```

**Returns:** `double`

### getCustomPageWidth

```java
double com.datalogics.PDFL.WebToPDFConvertParams.getCustomPageWidth()
```

**Returns:** `double`

### getCustomViewportHeight

```java
int com.datalogics.PDFL.WebToPDFConvertParams.getCustomViewportHeight()
```

**Returns:** `int`

### getCustomViewportWidth

```java
int com.datalogics.PDFL.WebToPDFConvertParams.getCustomViewportWidth()
```

**Returns:** `int`

### getDisplayHeaderFooter

```java
boolean com.datalogics.PDFL.WebToPDFConvertParams.getDisplayHeaderFooter()
```

**Returns:** `boolean`

### getDownsamplingDPI

```java
WebDownsamplingDPI com.datalogics.PDFL.WebToPDFConvertParams.getDownsamplingDPI()
```

**Returns:** `WebDownsamplingDPI`

### getEnableVerboseLogging

```java
boolean com.datalogics.PDFL.WebToPDFConvertParams.getEnableVerboseLogging()
```

**Returns:** `boolean`

### getGenerateTaggedPDF

```java
boolean com.datalogics.PDFL.WebToPDFConvertParams.getGenerateTaggedPDF()
```

**Returns:** `boolean`

### getImageCompression

```java
WebImageCompression com.datalogics.PDFL.WebToPDFConvertParams.getImageCompression()
```

**Returns:** `WebImageCompression`

### getMarginBottom

```java
double com.datalogics.PDFL.WebToPDFConvertParams.getMarginBottom()
```

**Returns:** `double`

### getMarginLeft

```java
double com.datalogics.PDFL.WebToPDFConvertParams.getMarginLeft()
```

**Returns:** `double`

### getMarginRight

```java
double com.datalogics.PDFL.WebToPDFConvertParams.getMarginRight()
```

**Returns:** `double`

### getMarginTop

```java
double com.datalogics.PDFL.WebToPDFConvertParams.getMarginTop()
```

**Returns:** `double`

### getPageOrientation

```java
WebPageOrientation com.datalogics.PDFL.WebToPDFConvertParams.getPageOrientation()
```

**Returns:** `WebPageOrientation`

### getPageSize

```java
WebPageSize com.datalogics.PDFL.WebToPDFConvertParams.getPageSize()
```

**Returns:** `WebPageSize`

### getPreferCSSPageSize

```java
boolean com.datalogics.PDFL.WebToPDFConvertParams.getPreferCSSPageSize()
```

**Returns:** `boolean`

### getPrintBackground

```java
boolean com.datalogics.PDFL.WebToPDFConvertParams.getPrintBackground()
```

**Returns:** `boolean`

### getScale

```java
double com.datalogics.PDFL.WebToPDFConvertParams.getScale()
```

**Returns:** `double`

### getTimeoutSeconds

```java
int com.datalogics.PDFL.WebToPDFConvertParams.getTimeoutSeconds()
```

**Returns:** `int`

### getViewportSize

```java
WebViewportPreset com.datalogics.PDFL.WebToPDFConvertParams.getViewportSize()
```

**Returns:** `WebViewportPreset`

### setCustomPageSize

```java
void com.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

```java
void com.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.

### setDisplayHeaderFooter

```java
void com.datalogics.PDFL.WebToPDFConvertParams.setDisplayHeaderFooter(boolean v)
```

**Parameters**

- `v` (`boolean`)

**Returns:** `void`

Show the default browser-style header and footer.

### setDownsamplingDPI

```java
void com.datalogics.PDFL.WebToPDFConvertParams.setDownsamplingDPI(WebDownsamplingDPI v)
```

**Parameters**

- `v` (`WebDownsamplingDPI`)

**Returns:** `void`

Downsampling resolution for raster images. Use the Disabled value to preserve the original resolution.

### setEnableVerboseLogging

```java
void com.datalogics.PDFL.WebToPDFConvertParams.setEnableVerboseLogging(boolean v)
```

**Parameters**

- `v` (`boolean`)

**Returns:** `void`

Emit debug-level log messages during conversion.

### setGenerateTaggedPDF

```java
void com.datalogics.PDFL.WebToPDFConvertParams.setGenerateTaggedPDF(boolean v)
```

**Parameters**

- `v` (`boolean`)

**Returns:** `void`

Produce a tagged (accessible) PDF.

### setImageCompression

```java
void com.datalogics.PDFL.WebToPDFConvertParams.setImageCompression(WebImageCompression v)
```

**Parameters**

- `v` (`WebImageCompression`)

**Returns:** `void`

Compression applied to raster images embedded in the output PDF.

### setMargins

```java
void com.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.

### setPageOrientation

```java
void com.datalogics.PDFL.WebToPDFConvertParams.setPageOrientation(WebPageOrientation v)
```

**Parameters**

- `v` (`WebPageOrientation`)

**Returns:** `void`

Output page orientation (portrait or landscape).

### setPageSize

```java
void com.datalogics.PDFL.WebToPDFConvertParams.setPageSize(WebPageSize v)
```

**Parameters**

- `v` (`WebPageSize`)

**Returns:** `void`

Output page size. Use the Custom value together with SetCustomPageSize to specify an explicit size in points.

### setPreferCSSPageSize

```java
void com.datalogics.PDFL.WebToPDFConvertParams.setPreferCSSPageSize(boolean v)
```

**Parameters**

- `v` (`boolean`)

**Returns:** `void`

### setPrintBackground

```java
void com.datalogics.PDFL.WebToPDFConvertParams.setPrintBackground(boolean v)
```

**Parameters**

- `v` (`boolean`)

**Returns:** `void`

Print CSS background colors and images.

### setScale

```java
void com.datalogics.PDFL.WebToPDFConvertParams.setScale(double v)
```

**Parameters**

- `v` (`double`)

**Returns:** `void`

Content scale factor (1.0 = 100%).

### setTimeoutSeconds

```java
void com.datalogics.PDFL.WebToPDFConvertParams.setTimeoutSeconds(int v)
```

**Parameters**

- `v` (`int`)

**Returns:** `void`

Conversion timeout in seconds: 0 = plugin default (300s), -1 = infinite, positive = an explicit number of seconds.

### setViewportSize

```java
void com.datalogics.PDFL.WebToPDFConvertParams.setViewportSize(WebViewportPreset v)
```

**Parameters**

- `v` (`WebViewportPreset`)

**Returns:** `void`

Viewport preset controlling the size of the rendering surface. Use the Custom preset together with SetCustomViewport to specify an explicit pixel size.
