public final class Image extends Paragraph
Represents an image Paragraph
in a Pdf document.
[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); aspose.pdf.generator.Image image1 = new aspose.pdf.generator.Image(sec1); sec1.getParagraphs().add(image1); image1.getImageInfo().setFile ( "C:/Images/Apple.jpg"); image1.getImageInfo().setImageFileType ( ImageFileType.Jpeg); GraphNote note1 = new GraphNote(sec1); note1.setContent ( "this is note1"); note1.setPositionX ( 50); note1.setPositionY ( 100); image1.getImageNotes().add(note1); aspose.pdf.generator.Image image2 = new aspose.pdf.generator.Image(sec1); sec1.getParagraphs().add(image2); image2.getImageInfo().setFile ( "C:/Images/Flower.fax"); image2.getImageInfo().setImageFileType ( ImageFileType.Ccitt); image2.getImageInfo().setCcittSubFormat ( CcittSubFormat.Group31D); image2.getImageInfo().setCcittImageWidth ( 350); image2.getImageInfo().setCcittImageHeight ( 400); pdf1.save(...); [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section> <Image File="C:/Images/Flower.jpg" Type="jpeg"> <Note Position="50 100">this is note1</Note> </Image> <Image File="C:/Images/Flower.fax" Type="ccitt" CcittImageWidth="350" CcittImageHeight="400" CcittSubFormat="Group31D"> </Image> </Section> </Pdf>
Modifier and Type | Field and Description |
---|---|
Hyperlink |
Hyperlink
Gets or sets a
Hyperlink object that indicates the hyper link info of the image. |
byte[] |
ImageBytesIfAny |
ImageInfo |
ImageInfo
Gets or sets a
ImageInfo object that indicates the common image info. |
GraphNotes |
ImageNotes
Gets or sets a
GraphNotes collection that indicates all notes in the image. |
boolean |
IsImageFitToRowHeight
Gets or sets a bool value that indicates whether the image fit to the size of cell which has the only image paragraph.
|
boolean |
IsNeedRepeating
Gets or sets a bool value that indicates whether the paragraph need to be repeated on next page.
|
float |
Opacity
Gets or sets a float value between 0.0 and 1.0 that indicates the opacity of the image.
|
float |
RotatingAngle
Gets or sets a float value between -90 and 90 that indicates the number of degrees by which the image should be
rotated anticlockwise when displayed or printed.
|
boolean |
UseTOCasTargetList
Get or set a bool value that indicates whether the image will be referenced in TOC instead of special ImageList
|
int |
ZIndex
Gets or sets a int value that indicates the Z-order of the image.
|
_PositioningType, FixedHeight, FixedWidth, ID, IsDisabled, IsFirstParagraph, IsFirstParagraphInColumn, IsInList, IsKeptTogether, IsKeptWithNext, IsOnOddPage, Left, Margin, ReferenceParagraphID, Top
Constructor and Description |
---|
Image()
Initializes a new instance of the
Image class. |
Image(Section section)
Initializes a new instance of the
Image class. |
Modifier and Type | Method and Description |
---|---|
Object |
completeClone()
Clones a new
Image object. |
int |
getAutoNumber()
Gets or sets a automated seqence number for Image objects.
|
float |
getImageHeight()
Gets or 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.,
CCITT fax image or image on the web.
|
float |
getImageScale()
Gets or sets a float value that indicates the scale rate of the image when
placed into pdf file.
|
float |
getImageWidth()
Gets or sets a float value that indicates the image width.
|
float |
getVectorGraphicsRenderingDPI()
Gets or sets a float value that indicates DPI
that will be used during rendering of vecotor images
to PDF-bitmaps when instance references vector image
as raw image .
|
void |
load(com.aspose.ms.System.Xml.XmlTextReader xmlReader,
LoadingContext context) |
void |
setAutoNumber(int value) |
void |
setImageHeight(float value) |
void |
setImageScale(float value) |
void |
setImageWidth(float value) |
void |
setVectorGraphicsRenderingDPI(float value) |
copyTo, getBookmarked, setBookmarked
public ImageInfo ImageInfo
Gets or sets a ImageInfo
object that indicates the common image info.
public Hyperlink Hyperlink
Gets or sets a Hyperlink
object that indicates the hyper link info of the image.
public boolean UseTOCasTargetList
Get or set a bool value that indicates whether the image will be referenced in TOC instead of special ImageList
public float Opacity
Gets or sets a float value between 0.0 and 1.0 that indicates the opacity of the image. The default value is 1.0.
public float RotatingAngle
Gets or sets a float value between -90 and 90 that indicates the number of degrees by which the image should be rotated anticlockwise when displayed or printed. Default value is 0.
public int ZIndex
Gets or sets a int value that indicates the Z-order of the image. A image with larger ZIndex will be placed over the image with smaller ZIndex. ZIndex can be negative. Image with negative ZIndex will be placed behind the text in the page.
public boolean IsImageFitToRowHeight
Gets or sets a bool value that indicates whether the image fit to the size of cell which has the only image paragraph.
public boolean IsNeedRepeating
Gets or sets a bool value that indicates whether the paragraph need to be repeated on next page. Default value is false.The attribute is only valid when the paragraph itself and the object its ReferenceParagraphID referred to both are included in RepeatingRows.
public GraphNotes ImageNotes
Gets or sets a GraphNotes
collection that indicates all notes in the image.
public byte[] ImageBytesIfAny
public Image()
Initializes a new instance of the Image
class.
public Image(Section section)
Initializes a new instance of the Image
class.
section
- The section object.
Section
object.
public int getAutoNumber()
Gets or sets a automated seqence number for Image objects. The default first value is 1. If set to be n,the value of the next image will be (n+1).
public void setAutoNumber(int value)
public float getImageHeight()
Gets or 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., CCITT fax image or image on the web.
public void setImageHeight(float value)
public float getImageWidth()
Gets or 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., CCITT fax image or image on the web.
public void setImageWidth(float value)
public float getVectorGraphicsRenderingDPI()
Gets or sets a float value that indicates DPI that will be used during rendering of vecotor images to PDF-bitmaps when instance references vector image as raw image . Valid range is 1-10000, recommended range is 72-288. Increasing of this value enhances quality but slows down rendering process and makes it more memory consuming one.
public void setVectorGraphicsRenderingDPI(float value)
public float getImageScale()
Gets or sets a float value that indicates the scale rate of the image when placed into pdf file.
public void setImageScale(float value)
public void load(com.aspose.ms.System.Xml.XmlTextReader xmlReader, LoadingContext context)
load
in class XmlEntityWithInternals
public Object completeClone()
Clones a new Image
object.
completeClone
in class Paragraph
Copyright © 2014 Aspose. All Rights Reserved.