|
com.aspose.pdf.elements
Class Image
java.lang.Object
com.aspose.pdf.elements.PdfElementBase
com.aspose.pdf.elements.Paragraph
com.aspose.pdf.elements.Image
- All Implemented Interfaces:
- java.lang.Cloneable
public class Image - extends Paragraph
Represents an image Paragraph in a Pdf document.
|
Constructor Summary |
Image(Section section)
Initialize a new instance of the Image class. |
|
Method Summary |
java.lang.Object |
clone()
Clone an object. |
org.w3c.dom.Element |
getDOMElement()
Gets a DOM representation of the pdf element. |
HyperLink |
getHyperLink()
Gets a Hyperlink object that indicates the hyper link info of the image. |
float |
getImageHeight()
Gets a float value that indicates the image height.This property
is not used to control the image height but used to spefity the image width
when there is no height info in image,e.g., image on the web. |
ImageInfo |
getImageInfo()
Gets an ImageInfo object that indicates the common image info. |
float |
getImageScale()
Gets a float value that indicates the scale rate of the image when placed into pdf file. |
float |
getImageWidth()
Gets a float value that indicates the image width. |
void |
setHyperLink(HyperLink link)
Sets a Hyperlink object that indicates the hyper link info of the image. |
void |
setImageHeight(float height)
commented by Sandy.Zhang 20080827 as customer can set fixedHeight in ImageInfo
Sets a float value that indicates the image height.This property
is not used to control the image height but used to spefity the image width
when there is no height info in image,e.g., image on the web. |
void |
setImageInfo(ImageInfo info)
Sets an ImageInfo object that indicates the common image info. |
void |
setImageScale(float scale)
Sets a float value that indicates the scale rate of the image when placed into pdf file. |
void |
setImageWidth(float width)
commented by Sandy.Zhang 20080827 as customer can set fixedWidth in ImageInfo
Sets a float value that indicates the image width. |
| Methods inherited from class com.aspose.pdf.elements.Paragraph |
getLeft, getMargin, getTop, isDisabled, isFirstParagraph, isKeptTogether, isOnOddPage, setDisabled, setFirstParagraph, setKeptTogether, setLeft, setMargin, setOnOddPage, setTop |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Image
public Image(Section section)
- Initialize a new instance of the Image class.
[SampleCode]
Pdf pdf = new Pdf();
Section sec1 = pdf.getSections().add();
Image img = new Image(sec1);
img.setFile("http://www.aspose.com/images/banner-top-mid.gif");
sec1.getParagraphs().add(img);
- Parameters:
section - The section that owns the Iamge paragraph.
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Description copied from class:
PdfElementBase
- Clone an object.
- Overrides:
clone in class Paragraph
- Throws:
java.lang.CloneNotSupportedException- See Also:
Object.clone()
getHyperLink
public HyperLink getHyperLink()
- Gets a Hyperlink object that indicates the hyper link info of the image.
setHyperLink
public void setHyperLink(HyperLink link)
throws java.lang.CloneNotSupportedException
- Sets a Hyperlink object that indicates the hyper link info of the image.
- Throws:
java.lang.CloneNotSupportedException- See Also:
HyperLink
getImageInfo
public ImageInfo getImageInfo()
- Gets an ImageInfo object that indicates the common image info.
- Returns:
- Returns the ImageInfo.
- See Also:
ImageInfo
setImageInfo
public void setImageInfo(ImageInfo info)
- Sets an ImageInfo object that indicates the common image info.
- Parameters:
info - The ImageInfo to set.- See Also:
ImageInfo
getImageHeight
public float getImageHeight()
- Gets a float value that indicates the image height.This property
is not used to control the image height but used to spefity the image width
when there is no height info in image,e.g., image on the web.
setImageHeight
public void setImageHeight(float height)
- commented by Sandy.Zhang 20080827 as customer can set fixedHeight in ImageInfo
Sets a float value that indicates the image height.This property
is not used to control the image height but used to spefity the image width
when there is no height info in image,e.g., image on the web.
- Parameters:
height - The height to set.
getImageWidth
public float getImageWidth()
- Gets a float value that indicates the image width. This property
is not used to control the image width but used to spefity the image width
when there is no width info in image,e.g.,image on the web.
setImageWidth
public void setImageWidth(float width)
- commented by Sandy.Zhang 20080827 as customer can set fixedWidth in ImageInfo
Sets a float value that indicates the image width. This property
is not used to control the image width but used to spefity the image width
when there is no width info in image,e.g., image on the web.
- Parameters:
width - The width to set.
getImageScale
public float getImageScale()
- Gets a float value that indicates the scale rate of the image when placed into pdf file.
setImageScale
public void setImageScale(float scale)
- Sets a float value that indicates the scale rate of the image when placed into pdf file.
- Parameters:
scale - The image Scale to set.
getDOMElement
public org.w3c.dom.Element getDOMElement()
throws AsposeBaseException
- Description copied from class:
PdfElementBase
- Gets a DOM representation of the pdf element.
- Overrides:
getDOMElement in class Paragraph
- Throws:
AsposeBaseException- See Also:
PdfElementBase.getDOMElement()
|