# QREncodeParams Class

> Used to control how the QR code is created.

- Product: Adobe PDF Library 18
- Language: Java
- Version: APDFL18.0.5PlusP2e
- HTML page: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/QREncodeParams
- Version index: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/llms.txt

```java
class QREncodeParams
```

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

## Description

Used to control how the QR code is created.

**Referenced by:** [`Page`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Page.md)

**Uses types:** [`QRColor`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/QRColor.md)

## Constructors

### QREncodeParams

```java
com.datalogics.PDFL.QREncodeParams.QREncodeParams(String text, double x, double y, double width, double height, QRErrorCorrectionLevel errorLevel, long quietZoneSize, QRColor codeColor, QRColor backgroundColor)
```

*constructor*

**Parameters**

- `text` (`String`): The text string to encode in the QR code.
- `x` (`double`): The X coordinate of the lower-left corner of the QR code on the page, in user space units.
- `y` (`double`): The Y coordinate of the lower-left corner of the QR code on the page, in user space units.
- `width` (`double`): The width of the QR code, in user space units.
- `height` (`double`): The height of the QR code, in user space units.
- `errorLevel` (`QRErrorCorrectionLevel`): The error correction level for the QR code.
- `quietZoneSize` (`long`): The size of the quiet zone (margin) around the QR code, in modules.
- `codeColor` ([`QRColor`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/QRColor.md)): The color of the QR code modules (the dark elements).
- `backgroundColor` ([`QRColor`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/QRColor.md)): The color of the background behind the QR code modules.

Create a new QREncodeParams object using the specified values.

## Methods

### delete

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

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

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

**Returns:** `synchronized void`

### finalize

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

*protected*

**Returns:** `void`

### getBackgroundColor

```java
QRColor com.datalogics.PDFL.QREncodeParams.getBackgroundColor()
```

**Returns:** [`QRColor`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/QRColor.md)

Get the color of the background behind the QR code modules.

### getCodeColor

```java
QRColor com.datalogics.PDFL.QREncodeParams.getCodeColor()
```

**Returns:** [`QRColor`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/QRColor.md)

Get the color of the QR code modules (the dark elements).

### getErrorCorrectionLevel

```java
QRErrorCorrectionLevel com.datalogics.PDFL.QREncodeParams.getErrorCorrectionLevel()
```

**Returns:** `QRErrorCorrectionLevel`

Get the error correction level of the QR code.

### getHeight

```java
double com.datalogics.PDFL.QREncodeParams.getHeight()
```

**Returns:** `double`

Get the height of the QR code, in user space units.

### getQuietZoneSize

```java
long com.datalogics.PDFL.QREncodeParams.getQuietZoneSize()
```

**Returns:** `long`

Get the quiet zone size (margin around the QR code), in modules.

### getTextToEncode

```java
String com.datalogics.PDFL.QREncodeParams.getTextToEncode()
```

**Returns:** `String`

Get the text string to be encoded in the QR code.

### getWidth

```java
double com.datalogics.PDFL.QREncodeParams.getWidth()
```

**Returns:** `double`

Get the width of the QR code, in user space units.

### getX

```java
double com.datalogics.PDFL.QREncodeParams.getX()
```

**Returns:** `double`

Get the X coordinate of the lower-left corner of the QR code on the page, in user space units.

### getY

```java
double com.datalogics.PDFL.QREncodeParams.getY()
```

**Returns:** `double`

Get the Y coordinate of the lower-left corner of the QR code on the page, in user space units.

### setBackgroundColor

```java
void com.datalogics.PDFL.QREncodeParams.setBackgroundColor(QRColor backgroundColor)
```

**Parameters**

- `backgroundColor` ([`QRColor`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/QRColor.md))

**Returns:** `void`

Set the color of the background behind the QR code modules.

### setCodeColor

```java
void com.datalogics.PDFL.QREncodeParams.setCodeColor(QRColor codeColor)
```

**Parameters**

- `codeColor` ([`QRColor`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/QRColor.md))

**Returns:** `void`

Set the color of the QR code modules (the dark elements).

### setErrorCorrectionLevel

```java
void com.datalogics.PDFL.QREncodeParams.setErrorCorrectionLevel(QRErrorCorrectionLevel errorLevel)
```

**Parameters**

- `errorLevel` (`QRErrorCorrectionLevel`)

**Returns:** `void`

Set the error correction level of the QR code.

### setHeight

```java
void com.datalogics.PDFL.QREncodeParams.setHeight(double height)
```

**Parameters**

- `height` (`double`)

**Returns:** `void`

Set the height of the QR code, in user space units.

### setQuietZoneSize

```java
void com.datalogics.PDFL.QREncodeParams.setQuietZoneSize(long quiteSize)
```

**Parameters**

- `quiteSize` (`long`)

**Returns:** `void`

Set the quiet zone size (margin around the QR code), in modules.

### setTextToEncode

```java
void com.datalogics.PDFL.QREncodeParams.setTextToEncode(String textToEncode)
```

**Parameters**

- `textToEncode` (`String`)

**Returns:** `void`

Set the text string to be encoded in the QR code.

### setWidth

```java
void com.datalogics.PDFL.QREncodeParams.setWidth(double width)
```

**Parameters**

- `width` (`double`)

**Returns:** `void`

Set the width of the QR code, in user space units.

### setX

```java
void com.datalogics.PDFL.QREncodeParams.setX(double x)
```

**Parameters**

- `x` (`double`)

**Returns:** `void`

Set the X coordinate of the lower-left corner of the QR code on the page, in user space units.

### setY

```java
void com.datalogics.PDFL.QREncodeParams.setY(double y)
```

**Parameters**

- `y` (`double`)

**Returns:** `void`

Set the Y coordinate of the lower-left corner of the QR code on the page, in user space units.
