PdfDrawOptions.CreateFitSize Method

Creates draw options for producing images of PDF pages resized to fit the specified size.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
public static PdfDrawOptions CreateFitSize(
	PdfSize sizePixels,
	bool cutUnusedSpace
)
VB
Public Shared Function CreateFitSize ( 
	sizePixels As PdfSize,
	cutUnusedSpace As Boolean
) As PdfDrawOptions

Parameters

sizePixels
Type: BitMiracle.Docotic.Pdf.PdfSize
The size of images in pixels.
cutUnusedSpace
Type: System.Boolean
Defines whether to cut unused space.

Return Value

Type: PdfDrawOptions
The options for producing images of PDF pages resized to fit the specified size.

Remarks

The width and height should be in the [1..10000] range.

If cutUnusedSpace is true then produced images will have the width and height equal to the width and height of the corresponding PDF pages, resized to fit specified size.

If cutUnusedSpace is false then produced images will have the size equal to the size specified by sizePixels. The corresponding PDF pages will be drawn in the center of their image, preserving aspect ratio. The unused space will be filled with the transparent color.

Use HorizontalResolution and VerticalResolution properties to change the pixel density (i.e., the physical size) of the output image.

See Also