Class ContentElement
- java.lang.Object
-
- com.pdf_tools.fourheights.pdftoolbox.internal.NativeBase
-
- com.pdf_tools.fourheights.pdftoolbox.internal.NativeObject
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.content.ContentElement
-
- Direct Known Subclasses:
GroupElement,ImageElement,ImageMaskElement,PathElement,ShadingElement,TextElement
public abstract class ContentElement extends NativeObject
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContentElementcopy(Document targetDocument, ContentElement contentElement)Copy a content elementRectanglegetBoundingBox()the bounding box (Getter)AffineTransformgetTransform()the transform to be applied to the alignment rectangle (Getter)voidsetTransform(AffineTransform value)the transform to be applied to the alignment rectangle (Setter)-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
copy
public static ContentElement copy(Document targetDocument, ContentElement contentElement) throws java.io.IOException, ConformanceException
Copy a content element
The returned object is associated with the given target document but not yet part of it.- Parameters:
targetDocument- the output document with which the returned object is associatedcontentElement- a content element of a different document- Returns:
- the copied content element, associated with the current document
- Throws:
java.io.IOException- Error reading from the source document or writing to the target documentConformanceException- The conformance level of the source document is not compatible with the conformance level of the target document.ConformanceException- The conformance of thetargetDocumentis PDF/A with a conformance level "a": PDF/A-1a, PDF/A-2a, PDF/A-3a.java.lang.IllegalArgumentException- if thetargetDocumentargument has already been closedjava.lang.IllegalArgumentException- if thetargetDocumentargument is read-onlyjava.lang.IllegalArgumentException- thecontentElementobject is not associated with an input documentjava.lang.IllegalArgumentException- the document associated with thecontentElementobject has already been closedjava.lang.IllegalArgumentException- iftargetDocumentisnulljava.lang.IllegalArgumentException- ifcontentElementisnull
-
getBoundingBox
public Rectangle getBoundingBox()
the bounding box (Getter)
This is a rectangle that encompasses all parts of an element.- Throws:
java.lang.IllegalStateException- the object has already been closed
-
getTransform
public AffineTransform getTransform()
the transform to be applied to the alignment rectangle (Getter)
Use this transform matrix to compute the actual location of the element's alignment rectangle.- Throws:
java.lang.IllegalStateException- the object has already been closed
-
setTransform
public void setTransform(AffineTransform value)
the transform to be applied to the alignment rectangle (Setter)
Use this transform matrix to compute the actual location of the element's alignment rectangle.- Throws:
java.lang.IllegalStateException- the object has already been closedjava.lang.IllegalArgumentException- if the transform to be set is non-invertiblejava.lang.UnsupportedOperationException- if the document is read-onlyjava.lang.IllegalArgumentException- ifvalueisnull
-
-