insert

public final PdfPage insert(int index)

Inserts a new page at the specified position with the default A4 page size.

Return

The newly created .

Parameters

index

The 0-based index at which to insert the new page.

Throws

Thrown when index is out of range.

Thrown when the operation fails.


public final PdfPage insert(int index, float width, float height)

Inserts a new page at the specified position with the specified dimensions.

Return

The newly created .

Parameters

index

The 0-based index at which to insert the new page.

width

Width of the new page in points.

height

Height of the new page in points.

Throws

Thrown when index is out of range.

Thrown when the operation fails.


public final PdfPage insert(int index, PdfPageSizes pageSize)

Inserts a new page at the specified position with a predefined page size.

Return

The newly created .

Parameters

index

The 0-based index at which to insert the new page.

pageSize

The predefined page size.

Throws

Thrown when index is out of range.

Thrown when the operation fails.