public final class PngDevice extends ImageDevice
Represents image device that helps to save pdf document pages into png.
Constructor and Description |
---|
PngDevice()
Initializes a new instance of the
PngDevice class with default resolution. |
PngDevice(int width,
int height)
Initializes a new instance of the
PngDevice class with provided image dimensions,
default resolution (=150). |
PngDevice(int width,
int height,
Resolution resolution)
Initializes a new instance of the
PngDevice class with provided image dimensions and
resolution. |
PngDevice(PageSize pageSize)
Initializes a new instance of the
PngDevice class with provided page size, default
resolution (=150). |
PngDevice(PageSize pageSize,
Resolution resolution)
Initializes a new instance of the
PngDevice class with provided page size and
resolution. |
PngDevice(Resolution resolution)
Initializes a new instance of the
PngDevice class. |
Modifier and Type | Method and Description |
---|---|
void |
process(Page page,
OutputStream output)
Converts the page into png and saves it in the output stream.
|
void |
processInternal(Page page,
com.aspose.ms.System.IO.Stream output)
Converts the page into png and saves it in the output stream.
|
BufferedImage |
processToBufferedImage(Page page)
Converts the page into BufferedImage.
|
getCoordinateType, getCropRectangle, getFormPresentationMode, getHeight, getRenderingOptions, getResolution, getWidth, isShadingPerformanceHigh, setCoordinateType, setCropRectangle, setFormPresentationMode, setRenderingOptions, setShadingPerformanceHigh
process, process
public PngDevice()
Initializes a new instance of the PngDevice
class with default resolution.
public PngDevice(Resolution resolution)
Initializes a new instance of the PngDevice
class.
resolution
- Resolution for the result image file, see Resolution
class.public PngDevice(int width, int height, Resolution resolution)
Initializes a new instance of the PngDevice
class with provided image dimensions and
resolution.
width
- Image output width.height
- Image output height.resolution
- Resolution for the result image file, see Resolution
class.public PngDevice(PageSize pageSize, Resolution resolution)
Initializes a new instance of the PngDevice
class with provided page size and
resolution.
pageSize
- Page size of the output image.resolution
- Resolution for the result image file, see Resolution
class.public PngDevice(int width, int height)
Initializes a new instance of the PngDevice
class with provided image dimensions,
default resolution (=150).
width
- Image output width.height
- Image output height.public PngDevice(PageSize pageSize)
Initializes a new instance of the PngDevice
class with provided page size, default
resolution (=150).
pageSize
- Page size of the output image.public void processInternal(Page page, com.aspose.ms.System.IO.Stream output)
Converts the page into png and saves it in the output stream.
processInternal
in class PageDevice
page
- The page to convert.output
- Output stream with png image.public void process(Page page, OutputStream output)
Converts the page into png and saves it in the output stream.
process
in class PageDevice
page
- The page to convert.output
- Output stream with png image.public BufferedImage processToBufferedImage(Page page)
Converts the page into BufferedImage.
page
- The page to convert.