ElegantJ PDF Library Java API Specification v1.1

com.elegantj.pdf
Class PDFImage

java.lang.Object
  extended bycom.elegantj.pdf.PDFObject
      extended bycom.elegantj.pdf.PDFGraphicsObject
          extended bycom.elegantj.pdf.PDFImage

public class PDFImage
extends PDFGraphicsObject

This class represents PDF Image Object Use JPEG format images to insert into a PDF document This PDFImage object supports only JPEG image format


Field Summary
static java.lang.String DEVICE_GRAY_COLOR_SPACE
           
static java.lang.String DEVICE_RGB_COLOR_SPACE
           
 
Fields inherited from class com.elegantj.pdf.PDFGraphicsObject
BEVEL_JOINS, BUTT_CAPS, MITER_JOINS, ROUND_CAPS, ROUND_JOINS, SQUARE_CAPS
 
Constructor Summary
PDFImage(java.awt.Image image)
          Constructs the PDFImage from the awt image object
PDFImage(java.net.URL imageURL)
          Constructs a PDF Image object using specified image file url
 
Method Summary
 java.lang.Object clone()
          Returns the clone of this object
 int getActualImageHeight()
          Method which returns the actual image height of the specified image
 int getActualImageWidth()
          Method which returns the actual image width of the specified image
 java.lang.String getColorSpace()
          Returns the color space for image
 com.elegantj.pdf.PDFImage.PDFDrawImage getDrawImage()
          Method which returns the PDFDrawImage object which can be used to draw this image object
 int getImageHeight()
          Returns the image height
 int getImageWidth()
          Returns the image width
 int getImageX()
          Method which Returns the display X-coordinate of the image
 int getImageY()
          Method which Returns the display Y-coordinate of the image
 java.lang.String getName()
          Method which returns the referenced name of this image object
 void setColorSpace(java.lang.String colorSpace)
          Sets the color space for image
 void setImageHeight(int hh)
          Method which sets the display height of the image
 void setImageWidth(int ww)
          Method which sets the display width of the image
 void setImageX(int n)
          Method which sets the display X-coordinate of the image
 void setImageY(int n)
          Method which sets the display Y-coordinate of the image
 
Methods inherited from class com.elegantj.pdf.PDFObject
getPDFObjectID, getPDFObjectRefStr, getPDFObjectType, setPDFObjectID, setPDFObjectType
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEVICE_RGB_COLOR_SPACE

public static java.lang.String DEVICE_RGB_COLOR_SPACE

DEVICE_GRAY_COLOR_SPACE

public static java.lang.String DEVICE_GRAY_COLOR_SPACE
Constructor Detail

PDFImage

public PDFImage(java.net.URL imageURL)
Constructs a PDF Image object using specified image file url

Parameters:
imageURL - The url of the image file in JPEG format

PDFImage

public PDFImage(java.awt.Image image)
Constructs the PDFImage from the awt image object

Parameters:
image - The image object, only JPEG image object allowed
Method Detail

getName

public java.lang.String getName()
Method which returns the referenced name of this image object

Returns:
The referenced name of this image object

getDrawImage

public com.elegantj.pdf.PDFImage.PDFDrawImage getDrawImage()
Method which returns the PDFDrawImage object which can be used to draw this image object

Returns:
The PDFDrawImage object which can be used to draw this image object

setImageWidth

public void setImageWidth(int ww)
Method which sets the display width of the image

Parameters:
ww - The display width of the image

getImageWidth

public int getImageWidth()
Returns the image width

Returns:
The image width

setImageHeight

public void setImageHeight(int hh)
Method which sets the display height of the image

Parameters:
hh - The display height of the image

getImageHeight

public int getImageHeight()
Returns the image height

Returns:
The image height

setImageX

public void setImageX(int n)
Method which sets the display X-coordinate of the image

Parameters:
n - The display X-coordinate of the image

getImageX

public int getImageX()
Method which Returns the display X-coordinate of the image

Returns:
The display X-coordinate of the image

setImageY

public void setImageY(int n)
Method which sets the display Y-coordinate of the image

Parameters:
n - The display Y-coordinate of the image

getImageY

public int getImageY()
Method which Returns the display Y-coordinate of the image

Returns:
The display Y-coordinate of the image

getActualImageWidth

public int getActualImageWidth()
Method which returns the actual image width of the specified image

Returns:
The actual image width

getActualImageHeight

public int getActualImageHeight()
Method which returns the actual image height of the specified image

Returns:
The actual image height

clone

public java.lang.Object clone()
Returns the clone of this object

Returns:
The clone of this object

setColorSpace

public void setColorSpace(java.lang.String colorSpace)
Sets the color space for image

Parameters:
colorSpace - The color space Possible values are DEVICE_RGB_COLOR_SPACE and DEVICE_GRAY_COLOR_SPACE

getColorSpace

public java.lang.String getColorSpace()
Returns the color space for image

Returns:
The color space Possible values are DEVICE_RGB_COLOR_SPACE and DEVICE_GRAY_COLOR_SPACE

ElegantJ PDF Library Java API Specification v1.1

For any feedback, suggestion, or query, please revert back to support@elegantjpdf.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjpdf.com
All Rights Reserved.