public class Image extends Paragraph implements IHyperlinkCarrier
Represents an image Paragraph
in a Pdf document.
[C#] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.Sections.Add(); Aspose.Pdf.Generator.Image image1 = new Aspose.Pdf.Generator.Image(sec1); sec1.Paragraphs.Add(image1); image1.ImageInfo.File = "C:/Images/Apple.jpg"; image1.ImageInfo.ImageFileType = ImageFileType.Jpeg; GraphNote note1 = new GraphNote(sec1); note1.Content = "this is note1"; note1.PositionX = 50; note1.PositionY = 100; image1.ImageNotes.Add(note1); Aspose.Pdf.Generator.Image image2 = new Aspose.Pdf.Generator.Image(sec1); sec1.Paragraphs.Add(image2); image2.ImageInfo.File = "C:/Images/Flower.fax"; image2.ImageInfo.ImageFileType = ImageFileType.Ccitt; image2.ImageInfo.CcittSubFormat = CcittSubFormat.Group31D; image2.ImageInfo.CcittImageWidth = 350; image2.ImageInfo.CcittImageHeight = 400; pdf1.Save(...); [Visual Basic] Dim pdf1 As Pdf = New Pdf() Dim sec1 As Section = pdf1.Sections.Add() Dim image1 As Aspose.Pdf.Generator.Image = New Aspose.Pdf.Generator.Image(sec1) sec1.Paragraphs.Add(image1) image1.ImageInfo.File = "C:/Images/Apple.jpg" image1.ImageInfo.ImageFileType = ImageFileType.Jpeg Dim note1 As GraphNote = New GraphNote(sec1) note1.Content = "this is note1" note1.PositionX = 50; note1.PositionY = 100; image1.ImageNotes.Add(note1) Dim image2 As Aspose.Pdf.Generator.Image = New Aspose.Pdf.Generator.Image(sec1) sec1.Paragraphs.Add(image2) image2.ImageInfo.File = "C:/Images/Flower.fax" image2.ImageInfo.ImageFileType = ImageFileType.Ccitt image2.ImageInfo.CcittSubFormat = CcittSubFormat.Group31D image2.ImageInfo.CcittImageWidth = 350 image2.ImageInfo.CcittImageHeight = 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>
Paragraph.VerticalPositionInfo
Modifier and Type | Field and Description |
---|---|
int |
ImageSlot |
boolean |
IsSizeProcessed
�Ƿ��Ѿ���ȡ��image�ĸ߶ȺͿ��
|
boolean |
isUseTOCasTargetList |
float |
RealHeight |
float |
RealWidth |
absolutePosX, absolutePosY, ClippingArea, FixedHeight, FixedWidth, isAbsoluteLayout, isFixedLayout, IsNeedAddToPage, IsPositionGot, IsPositionProcessed, isRelativeLayout, MayNeedReprocess, NextParagraph, posBottom, posLeft, posRight, posTop, RefPara, relativePosX, relativePosY, VerticalPosInfo
Constructor and Description |
---|
Image()
Initializes a new instance of the
Image class. |
Image(HeaderFooter hf)
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. |
static Image |
fromSystemImage(com.aspose.ms.System.Drawing.Image systemImage)
Creates a
aspose.pdf.Image object from a
System.Drawing.Image object. |
float |
getAdditionalHeightForRotating()
������ת�����ӵĸ߶�
|
int |
getAutoNumber()
Gets or sets a automated seqence number for Image objects.
|
GraphicState |
getGraphicState()
Gets or sets a object that indicates the graphic state for the image.
|
Hyperlink |
getHostedHyperlink() |
Hyperlink |
getHyperlink()
Gets or sets a
Hyperlink object that indicates the hyper link
info of the image. |
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 |
getImageHeightScale()
Gets or sets a float value that indicates the scale rate of the image
height when placed into pdf file.
|
ImageInfo |
getImageInfo()
Gets or sets a
ImageInfo object that indicates the common
image info. |
GraphNotes |
getImageNotes()
Gets or sets a
GraphNotes collection that indicates all notes
in the image. |
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 |
getImageWidthScale()
Gets or sets a float value that indicates the scale rate of the image
width when placed into pdf file.
|
float |
getOpacity()
Gets or sets a float value between 0.0 and 1.0 that indicates the
opacity of the image.
|
float |
getRotatingAngle()
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.
|
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 .
|
int |
getZIndex()
Gets or sets a int value that indicates the Z-order of 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.
|
void |
isImageFitToRowHeight(boolean value) |
boolean |
isNeedRepeating()
Gets or sets a bool value that indicates whether the paragraph need
to be repeated on next page.
|
void |
isNeedRepeating(boolean value) |
boolean |
isScaled() |
void |
isScaled(boolean value) |
void |
setAutoNumber(int value) |
void |
setHyperlink(Hyperlink value) |
void |
setImageHeight(float value) |
void |
setImageHeightScale(float value) |
void |
setImageInfo(ImageInfo value) |
void |
setImageNotes(GraphNotes value) |
void |
setImageScale(float value) |
void |
setImageWidth(float value) |
void |
setImageWidthScale(float value) |
void |
setOpacity(float value) |
void |
setRotatingAngle(float value) |
void |
setVectorGraphicsRenderingDPI(float value) |
void |
setZIndex(int value) |
copyTo, getBookmarked, getComposer, getFootNoteProcessed, getHeight, getID, getLeft, getMargin, getNeedReprocess, getNextParagraphInHeading, getPageNumber, getParentCell, getPositioningType, getPosX, getPosY, getRealPageNumber, getReferencedParagraphWidth, getReferenceParagraphID, getRefPageNumber, getSection, getTop, getWidth, isDisabled, isDisabled, isEndNote, isFirstParagraph, isFirstParagraph, isFirstParagraphInColumn, isFirstParagraphInColumn, isFootNote, isFootNote, isInHeaderFooter, isInHeaderFooter, isInList, isInList, isKeptTogether, isKeptTogether, isKeptWithNext, isKeptWithNext, isOnOddPage, isOnOddPage, setBookmarked, setFootNoteProcessed, setHeight, setID, setLeft, setMargin, setNeedReprocess, setNextParagraphInHeading, setPageNumber, setParentCell, setParentIsTable, setPositioningType, setPosX, setPosY, setRealPageNumber, setReferencedParagraphWidth, setReferenceParagraphID, setRefPageNumber, setSection, setTop, setWidth
public boolean isUseTOCasTargetList
public float RealWidth
public float RealHeight
public boolean IsSizeProcessed
�Ƿ��Ѿ���ȡ��image�ĸ߶ȺͿ��
public int ImageSlot
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 Image(HeaderFooter hf)
Initializes a new instance of the Image
class.
hf
- The HeaderFooter object. HeaderFooter
object.
public static Image fromSystemImage(com.aspose.ms.System.Drawing.Image systemImage)
Creates a aspose.pdf.Image
object from a
System.Drawing.Image
object.
[C#] System.Drawing.Image sysimg = System.Drawing.Image.FromFile("test.jpg"); Pdf pdf1 = new Pdf(); Section sec1 = pdf1.Sections.Add(); Aspose.Pdf.Generator.Image img1 = Aspose.Pdf.Generator.Image.FromSystemImage(sysimg); sec1.Paragraphs.Add(img1); pdf1.Save("test.pdf"); sysimg.Dispose(); [VB.NET] Dim sysimg As System.Drawing.Image = System.Drawing.Image.FromFile("test.jpg") Dim pdf1 As Pdf = New Pdf() Dim sec1 As Section = pdf1.Sections.Add() Dim img1 As Aspose.Pdf.Generator.Image = Aspose.Pdf.Generator.Image.FromSystemImage(sysimg) sec1.Paragraphs.Add(img1) pdf1.Save("test.pdf") sysimg.Dispose()
systemImage
- The System.Drawing.Image
object.Aspose.Pdf.Image
object.public ImageInfo getImageInfo()
Gets or sets a ImageInfo
object that indicates the common
image info.
public void setImageInfo(ImageInfo value)
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 void isNeedRepeating(boolean value)
public GraphNotes getImageNotes()
Gets or sets a GraphNotes
collection that indicates all notes
in the image.
public void setImageNotes(GraphNotes 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. null null null <BLOCKQUOTE class="dtBlock">
<Font color="red">NOTE: This property is now obsolete.</Font></BLOCKQUOTE>
<BLOCKQUOTE class="dtBlock">
Web image can be supported by setting the URL in Image.ImageInfo.File.You need not set
this property any more. For CCITT image, please use ImageInfo.CcittImageWidth instead.
It will be removed 12 months later since release 3.0.0.0 in April 2006. Aspose apologizes for
any inconvenience you may have experienced.</BLOCKQUOTE>
public void setImageWidth(float value)
public float getImageWidthScale()
Gets or sets a float value that indicates the scale rate of the image width when placed into pdf file.
public void setImageWidthScale(float 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. null null null <BLOCKQUOTE class="dtBlock">
<Font color="red">NOTE: This property is now obsolete.</Font></BLOCKQUOTE>
<BLOCKQUOTE class="dtBlock">
Web image can be supported by setting the URL in Image.ImageInfo.File.You need not set
this property any more. For CCITT image, please use ImageInfo.CcittImageHeight instead.
It will be removed 12 months later since release 3.0.0.0 in April 2006. Aspose apologizes for
any inconvenience you may have experienced.</BLOCKQUOTE>
public void setImageHeight(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 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 void isImageFitToRowHeight(boolean 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 getImageHeightScale()
Gets or sets a float value that indicates the scale rate of the image height when placed into pdf file.
public void setImageHeightScale(float value)
public GraphicState getGraphicState()
Gets or sets a object that indicates the graphic state for the image.
GraphicState
public float getOpacity()
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 void setOpacity(float value)
public boolean isScaled()
public void isScaled(boolean value)
public Object completeClone()
Clones a new Image
object.
completeClone
in class Paragraph
public Hyperlink getHyperlink()
Gets or sets a Hyperlink
object that indicates the hyper link
info of the image.
public void setHyperlink(Hyperlink value)
public int getZIndex()
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 void setZIndex(int value)
public float getRotatingAngle()
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 void setRotatingAngle(float value)
public float getAdditionalHeightForRotating()
������ת�����ӵĸ߶�
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 Hyperlink getHostedHyperlink()
getHostedHyperlink
in interface IHyperlinkCarrier
Copyright © 2016 Aspose. All Rights Reserved.