iText 8.0.5 API
iText.Svg.Element.SvgImage Class Reference

A layout element that represents SVG image for inclusion in the document model. More...

Inheritance diagram for iText.Svg.Element.SvgImage:
iText.Layout.Element.Image iText.Layout.Element.AbstractElement< iText.Layout.Element.Image > iText.Layout.Element.ILeafElement iText.Layout.Tagging.IAccessibleElement iText.Layout.Element.IElement iText.Layout.IPropertyContainer

Public Member Functions

  SvgImage (SvgImageXObject xObject)
  Creates an SvgImage from the iText.Svg.Xobject.SvgImageXObject which represents Form XObject and contains processor result with the SVG information and resource resolver for the SVG image. More...
 
virtual void  Generate (PdfDocument document)
  Draws SVG image to a canvas-like object maintained in the iText.Svg.Renderers.SvgDrawContext. More...
 
- Public Member Functions inherited from iText.Layout.Element.Image
  Image (PdfImageXObject xObject)
  Creates an Image from an image XObject, the representation of an image in PDF syntax. More...
 
  Image (PdfFormXObject xObject)
  Creates an Image from a form XObject, the representation of a form in PDF syntax. More...
 
  Image (PdfImageXObject xObject, float width)
  Creates an Image from an image XObject, the representation of an image in PDF syntax, with a custom width. More...
 
  Image (PdfImageXObject xObject, float left, float bottom, float width)
  Creates an Image from an image XObject, the representation of an image in PDF syntax, with a custom width and on a fixed position. More...
 
  Image (PdfImageXObject xObject, float left, float bottom)
  Creates an Image from an image XObject, the representation of an image in PDF syntax, on a fixed position. More...
 
  Image (PdfFormXObject xObject, float left, float bottom)
  Creates an Image from a form XObject, the representation of a form in PDF syntax. More...
 
  Image (ImageData img)
  Creates an Image from an image resource, read in from a file with the iText I/O module. More...
 
  Image (ImageData img, float left, float bottom)
  Creates an Image from an image resource, read in from a file with the iText I/O module, on a fixed position. More...
 
  Image (ImageData img, float left, float bottom, float width)
  Creates an Image from an image resource, read in from a file with the iText I/O module, with a custom width and on a fixed position. More...
 
virtual PdfXObject  GetXObject ()
  Gets the XObject contained in this image object More...
 
virtual iText.Layout.Element.Image  SetRotationAngle (double radAngle)
  Sets the rotation radAngle. More...
 
virtual UnitValue  GetMarginLeft ()
  Gets the current left margin width of the element. More...
 
virtual iText.Layout.Element.Image  SetMarginLeft (float value)
  Sets the left margin width of the element. More...
 
virtual UnitValue  GetMarginRight ()
  Gets the current right margin width of the image. More...
 
virtual iText.Layout.Element.Image  SetMarginRight (float value)
  Sets the right margin width of the image. More...
 
virtual UnitValue  GetMarginTop ()
  Gets the current top margin width of the image. More...
 
virtual iText.Layout.Element.Image  SetMarginTop (float value)
  Sets the top margin width of the image. More...
 
virtual UnitValue  GetMarginBottom ()
  Gets the current bottom margin width of the image. More...
 
virtual iText.Layout.Element.Image  SetMarginBottom (float value)
  Sets the bottom margin width of the image. More...
 
virtual iText.Layout.Element.Image  SetMargins (float marginTop, float marginRight, float marginBottom, float marginLeft)
  Sets the margins around the image to a series of new widths. More...
 
virtual UnitValue  GetPaddingLeft ()
  Gets the current left padding width of the image. More...
 
virtual iText.Layout.Element.Image  SetPaddingLeft (float value)
  Sets the left padding width of the image. More...
 
virtual UnitValue  GetPaddingRight ()
  Gets the current right padding width of the image. More...
 
virtual iText.Layout.Element.Image  SetPaddingRight (float value)
  Sets the right padding width of the image. More...
 
virtual UnitValue  GetPaddingTop ()
  Gets the current top padding width of the image. More...
 
virtual iText.Layout.Element.Image  SetPaddingTop (float value)
  Sets the top padding width of the image. More...
 
virtual UnitValue  GetPaddingBottom ()
  Gets the current bottom padding width of the image. More...
 
virtual iText.Layout.Element.Image  SetPaddingBottom (float value)
  Sets the bottom padding width of the image. More...
 
virtual iText.Layout.Element.Image  SetPadding (float commonPadding)
  Sets all paddings around the image to the same width. More...
 
virtual iText.Layout.Element.Image  SetPaddings (float paddingTop, float paddingRight, float paddingBottom, float paddingLeft)
  Sets the paddings around the image to a series of new widths. More...
 
virtual iText.Layout.Element.Image  Scale (float horizontalScaling, float verticalScaling)
  Scale the image relative to its default size. More...
 
virtual iText.Layout.Element.Image  ScaleToFit (float fitWidth, float fitHeight)
  Scale the image to an absolute size. More...
 
virtual iText.Layout.Element.Image  ScaleAbsolute (float fitWidth, float fitHeight)
  Scale the image to an absolute size. More...
 
virtual iText.Layout.Element.Image  SetAutoScale (bool autoScale)
  Sets the autoscale property for both width and height. More...
 
virtual iText.Layout.Element.Image  SetAutoScaleHeight (bool autoScale)
  Sets the autoscale property for the height of the image. More...
 
virtual iText.Layout.Element.Image  SetAutoScaleWidth (bool autoScale)
  Sets the autoscale property for the width of the image. More...
 
virtual iText.Layout.Element.Image  SetFixedPosition (float left, float bottom)
  Sets values for a absolute repositioning of the Element. More...
 
virtual iText.Layout.Element.Image  SetFixedPosition (int pageNumber, float left, float bottom)
  Sets values for a absolute repositioning of the Element, on a specific page. More...
 
virtual float  GetImageWidth ()
  Gets width of the image. More...
 
virtual float  GetImageHeight ()
  Gets height of the image. More...
 
virtual iText.Layout.Element.Image  SetHeight (float height)
  Sets the height property of the image, measured in points. More...
 
virtual iText.Layout.Element.Image  SetHeight (UnitValue height)
  Sets the height property of the image with a iText.Layout.Properties.UnitValue. More...
 
virtual iText.Layout.Element.Image  SetMaxHeight (float maxHeight)
  Sets the max-height property of the image, measured in points. More...
 
virtual iText.Layout.Element.Image  SetMaxHeight (UnitValue maxHeight)
  Sets the max-height property of the image with a iText.Layout.Properties.UnitValue. More...
 
virtual iText.Layout.Element.Image  SetMinHeight (float minHeight)
  Sets the min-height property of the image, measured in points. More...
 
virtual iText.Layout.Element.Image  SetMinHeight (UnitValue minHeight)
  Sets the min-height property of the image with a iText.Layout.Properties.UnitValue. More...
 
virtual iText.Layout.Element.Image  SetMaxWidth (float maxWidth)
  Sets the max-width property of the image, measured in points. More...
 
virtual iText.Layout.Element.Image  SetMaxWidth (UnitValue maxWidth)
  Sets the max-width property of the image with a iText.Layout.Properties.UnitValue. More...
 
virtual iText.Layout.Element.Image  SetMinWidth (float minWidth)
  Sets the min-width property of the image, measured in points. More...
 
virtual iText.Layout.Element.Image  SetMinWidth (UnitValue minWidth)
  Sets the min-width property of the image with a iText.Layout.Properties.UnitValue. More...
 
virtual iText.Layout.Element.Image  SetWidth (float width)
  Sets the width property of the image, measured in points. More...
 
virtual iText.Layout.Element.Image  SetWidth (UnitValue width)
  Sets the width property of the image with a iText.Layout.Properties.UnitValue. More...
 
virtual UnitValue  GetWidth ()
  Gets the width property of the image. More...
 
virtual float  GetImageScaledWidth ()
  Gets scaled width of the image. More...
 
virtual float  GetImageScaledHeight ()
  Gets scaled height of the image. More...
 
virtual iText.Layout.Element.Image  SetObjectFit (ObjectFit objectFit)
  Sets an object-fit mode for the image. More...
 
virtual ObjectFit  GetObjectFit ()
  Retrieves the iText.Layout.Properties.ObjectFit mode for the image. More...
 
virtual AccessibilityProperties  GetAccessibilityProperties ()
  Gets the accessibility properties. More...
 
virtual iText.Layout.Element.Image  SetNeutralRole ()
  Give this element a neutral role. More...
 
- Public Member Functions inherited from iText.Layout.Element.AbstractElement< iText.Layout.Element.Image >
virtual IRenderer  GetRenderer ()
  Gets a renderer for this element. More...
 
virtual void  SetNextRenderer (IRenderer renderer)
  Overrides the iText.Layout.Renderer.IRenderer instance which will be returned by the next call to the GetRenderer(). More...
 
virtual IRenderer  CreateRendererSubTree ()
  Creates a renderer subtree with root in the current element. More...
 
override bool  HasProperty (int property)
  Checks if this entity has the specified property. More...
 
override T1  GetProperty< T1 > (int property)
  Gets the property from this entity. More...
 
virtual T  AddStyle (Style style)
  Add a new style to this element. More...
 
virtual IList< IElement GetChildren ()
  Gets the child elements of this elements More...
 
virtual bool  IsEmpty ()
  Returns true if this list contains no elements. More...
 
virtual T  SetAction (PdfAction action)
  Sets an action on this Element. More...
 
virtual T  SetPageNumber (int pageNumber)
  Explicitly sets the page number this element should be put on. More...
 
- Public Member Functions inherited from iText.Layout.Element.IElement
void  SetNextRenderer (IRenderer renderer)
  Overrides the iText.Layout.Renderer.IRenderer instance which will be returned by the next call to the GetRenderer(). More...
 
IRenderer  GetRenderer ()
  Gets a renderer for this element. More...
 
IRenderer  CreateRendererSubTree ()
  Creates a renderer subtree with root in the current element. More...
 
- Public Member Functions inherited from iText.Layout.IPropertyContainer
bool  HasProperty (int property)
  Checks if this entity has the specified property. More...
 
bool  HasOwnProperty (int property)
  Checks if this entity has the specified property, i.e. if it was set to this very element earlier More...
 
T1  GetProperty< T1 > (int property)
  Gets the property from this entity. More...
 
T1  GetOwnProperty< T1 > (int property)
  Gets own property from this entity. More...
 
T1  GetDefaultProperty< T1 > (int property)
  Gets the default property from this entity. More...
 
void  SetProperty (int property, Object value)
  Sets a property for this entity. More...
 
void  DeleteOwnProperty (int property)
  Deletes the own property of this entity. More...
 

Protected Member Functions

override IRenderer  MakeNewRenderer ()
  Creates new renderer instance. More...
 

Additional Inherited Members

- Package Attributes inherited from iText.Layout.Element.Image
PdfXObject  xObject
 
DefaultAccessibilityProperties  tagProperties
 
- Package Attributes inherited from iText.Layout.Element.AbstractElement< iText.Layout.Element.Image >
IRenderer  nextRenderer
 
IList< IElement childElements
 
ICollection< Style styles
 

Detailed Description

A layout element that represents SVG image for inclusion in the document model.

Constructor & Destructor Documentation

◆ SvgImage()

iText.Svg.Element.SvgImage.SvgImage ( SvgImageXObject  xObject )
inline

Creates an SvgImage from the iText.Svg.Xobject.SvgImageXObject which represents Form XObject and contains processor result with the SVG information and resource resolver for the SVG image.

Parameters
xObject an internal iText.Svg.Xobject.SvgImageXObject.

Member Function Documentation

◆ Generate()

virtual void iText.Svg.Element.SvgImage.Generate ( PdfDocument  document )
inlinevirtual

Draws SVG image to a canvas-like object maintained in the iText.Svg.Renderers.SvgDrawContext.

Parameters
document pdf that shall contain the SVG image.

◆ MakeNewRenderer()

override IRenderer iText.Svg.Element.SvgImage.MakeNewRenderer ( )
inlineprotectedvirtual

Creates new renderer instance.

Reimplemented from iText.Layout.Element.Image.