Method CreateFitWidth
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
CreateFitWidth(double)
Creates draw options for producing images of PDF pages resized to fit the specified width.
public static PdfDrawOptions CreateFitWidth(double widthPixels)
Parameters
widthPixels
doubleThe width of images in pixels.
Returns
- PdfDrawOptions
The options for producing images of PDF pages resized to fit the specified width.
Remarks
The width should be in the [1..10000] range.
Each image produced with these options will have the specified width. The height of the image will be calculated dynamically using the aspect ratio of the corresponding PDF page.
Use HorizontalResolution and VerticalResolution properties to change the pixel density (i.e., the physical size) of produced images.
The Convert PDF to image in C# and VB.NET article shows how to specify the size of the output.