extends
Object
Renders a PDF document to an AWT BufferedImage.
This class may be overridden in order to perform custom rendering.
-
Author:
-
John Hewson
public BufferedImage renderImage(int pageIndex)
throws IOException
Returns the given page as an RGB image at 72 DPI
-
Parameters:
-
pageIndex
- the zero-based index of the page to be converted.
-
Returns:
-
the rendered page image
-
Throws:
-
IOException
- if the PDF cannot be read
throws
IOException
Returns the given page as an RGB image at the given scale.
A scale of 1 will render at 72 DPI.
-
Parameters:
-
pageIndex
- the zero-based index of the page to be converted
-
scale
- the scaling factor, where 1 = 72 DPI
-
Returns:
-
the rendered page image
-
Throws:
-
IOException
- if the PDF cannot be read
throws
IOException
Returns the given page as an RGB image at the given DPI.
-
Parameters:
-
pageIndex
- the zero-based index of the page to be converted
-
dpi
- the DPI (dots per inch) to render at
-
Returns:
-
the rendered page image
-
Throws:
-
IOException
- if the PDF cannot be read
ImageType
imageType)
throws
IOException
Returns the given page as an RGB image at the given DPI.
-
Parameters:
-
pageIndex
- the zero-based index of the page to be converted
-
dpi
- the DPI (dots per inch) to render at
-
imageType
- the type of image to return
-
Returns:
-
the rendered page image
-
Throws:
-
IOException
- if the PDF cannot be read
ImageType
imageType)
throws
IOException
Returns the given page as an RGB or ARGB image at the given scale.
-
Parameters:
-
pageIndex
- the zero-based index of the page to be converted
-
scale
- the scaling factor, where 1 = 72 DPI
-
imageType
- the type of image to return
-
Returns:
-
the rendered page image
-
Throws:
-
IOException
- if the PDF cannot be read
Graphics2D
graphics)
throws
IOException
Renders a given page to an AWT Graphics2D instance.
-
Parameters:
-
pageIndex
- the zero-based index of the page to be converted
-
graphics
- the Graphics2D on which to draw the page
-
Throws:
-
IOException
- if the PDF cannot be read
throws
IOException
Renders a given page to an AWT Graphics2D instance.
-
Parameters:
-
pageIndex
- the zero-based index of the page to be converted
-
graphics
- the Graphics2D on which to draw the page
-
scale
- the scale to draw the page at
-
Throws:
-
IOException
- if the PDF cannot be read
createPageDrawer
protected PageDrawer createPageDrawer(PageDrawerParameters parameters)
throws IOException
Returns a new PageDrawer instance, using the given parameters. May be overridden.
-
Throws:
-
IOException