Author: tilman
Date: Mon Oct 6 11:06:28 2025
New Revision: 1928972
Log:
PDFBOX-5660: improve javadoc
Modified:
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
Modified:
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
==============================================================================
---
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
Mon Oct 6 07:04:38 2025 (r1928971)
+++
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
Mon Oct 6 11:06:28 2025 (r1928972)
@@ -213,6 +213,9 @@ public class PDFRenderer
* @param pageIndex the zero-based index of the page to be converted.
* @return the rendered page image
* @throws IOException if the PDF cannot be read
+ * @throws IllegalStateException if the requested index isn't found or
doesn't point to a valid
+ * page dictionary
+ * @throws IndexOutOfBoundsException if the requested index is higher than
the page count
*/
public BufferedImage renderImage(int pageIndex) throws IOException
{
@@ -226,6 +229,9 @@ public class PDFRenderer
* @param scale the scaling factor, where 1 = 72 DPI
* @return the rendered page image
* @throws IOException if the PDF cannot be read
+ * @throws IllegalStateException if the requested index isn't found or
doesn't point to a valid
+ * page dictionary
+ * @throws IndexOutOfBoundsException if the requested index is higher than
the page count
*/
public BufferedImage renderImage(int pageIndex, float scale) throws
IOException
{
@@ -238,6 +244,9 @@ public class PDFRenderer
* @param dpi the DPI (dots per inch) to render at
* @return the rendered page image
* @throws IOException if the PDF cannot be read
+ * @throws IllegalStateException if the requested index isn't found or
doesn't point to a valid
+ * page dictionary
+ * @throws IndexOutOfBoundsException if the requested index is higher than
the page count
*/
public BufferedImage renderImageWithDPI(int pageIndex, float dpi) throws
IOException
{
@@ -251,6 +260,9 @@ public class PDFRenderer
* @param imageType the type of image to return
* @return the rendered page image
* @throws IOException if the PDF cannot be read
+ * @throws IllegalStateException if the requested index isn't found or
doesn't point to a valid
+ * page dictionary
+ * @throws IndexOutOfBoundsException if the requested index is higher than
the page count
*/
public BufferedImage renderImageWithDPI(int pageIndex, float dpi,
ImageType imageType)
throws IOException
@@ -265,6 +277,9 @@ public class PDFRenderer
* @param imageType the type of image to return
* @return the rendered page image
* @throws IOException if the PDF cannot be read
+ * @throws IllegalStateException if the requested index isn't found or
doesn't point to a valid
+ * page dictionary
+ * @throws IndexOutOfBoundsException if the requested index is higher than
the page count
*/
public BufferedImage renderImage(int pageIndex, float scale, ImageType
imageType)
throws IOException
@@ -281,6 +296,9 @@ public class PDFRenderer
* @param destination controlling visibility of optional content groups
* @return the rendered page image
* @throws IOException if the PDF cannot be read
+ * @throws IllegalStateException if the requested index isn't found or
doesn't point to a valid
+ * page dictionary
+ * @throws IndexOutOfBoundsException if the requested index is higher than
the page count
*/
public BufferedImage renderImage(int pageIndex, float scale, ImageType
imageType, RenderDestination destination)
throws IOException
@@ -444,6 +462,9 @@ public class PDFRenderer
* @param scaleY the scale to draw the page at for the y-axis, where 1 =
72 DPI
* @param destination controlling visibility of optional content groups
* @throws IOException if the PDF cannot be read
+ * @throws IllegalStateException if the requested index isn't found or
doesn't point to a valid
+ * page dictionary
+ * @throws IndexOutOfBoundsException if the requested index is higher than
the page count
*/
public void renderPageToGraphics(int pageIndex, Graphics2D graphics, float
scaleX, float scaleY, RenderDestination destination)
throws IOException