public abstract class PdfXObject extends PdfObjectWrapper<PdfStream>
PdfFormXObject
, PdfImageXObject
, Serialized Form
Modifier | Constructor and Description |
---|---|
protected |
PdfXObject(PdfStream pdfObject) |
Modifier and Type | Method and Description |
---|---|
void |
addAssociatedFile(PdfFileSpec fs)
Adds file associated with PDF XObject and identifies the relationship between them.
|
PdfArray |
getAssociatedFiles(boolean create)
Returns files associated with XObject.
|
float |
getHeight()
Gets height of XObject.
|
float |
getWidth()
Gets width of XObject.
|
protected boolean |
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the resultant document.
|
static PdfXObject |
makeXObject(PdfStream stream)
|
void |
setLayer(IPdfOCG layer)
Sets the layer this XObject belongs to.
|
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
protected PdfXObject(PdfStream pdfObject)
public static PdfXObject makeXObject(PdfStream stream)
stream
- PdfStream
with either PdfName.Form
or PdfName.Image
PdfName.Subtype
PdfFormXObject
or PdfImageXObject
.
public void setLayer(IPdfOCG layer)
layer
- the layer this XObject belongs to.
public float getWidth()
public float getHeight()
public void addAssociatedFile(PdfFileSpec fs)
For associated files their associated file specification dictionaries shall include the AFRelationship key
fs
- file specification dictionary of associated file
public PdfArray getAssociatedFiles(boolean create)
protected boolean isWrappedObjectMustBeIndirect()
isWrappedObjectMustBeIndirect
in class PdfObjectWrapper<PdfStream>
Copyright © 1998–2020 iText Group NV. All rights reserved.