IFragmentCollection Interface
A collection of page fragments.
Declaration
public interface IFragmentCollection extends IObjectCollectionBase<PageFragment>
Remarks
Use this interface to access, search, replace, clone, and manage PageFragment objects that define PDF page content.
Call the Page.getFragments() method to access the fragments collection.
Refer to the following help topic for additional information: Add Content to Pages.
Implements
Methods
copy() Method
Creates a copy of the fragment collection.
Declaration
public abstract IFragmentCollection copy()
Returns
| Type | Description |
|---|---|
IFragmentCollection |
A new |
copy(DocumentCloneContext context) Method
Creates a copy of the fragment collection within the specified clone context.
Declaration
public abstract IFragmentCollection copy(DocumentCloneContext context)
Parameters
| Name | Type | Description |
|---|---|---|
| context | DocumentCloneContext | A |
Returns
| Type | Description |
|---|---|
IFragmentCollection |
A copied |
find(Predicate<PageFragment> func) Method
Returns the first page fragment that matches the specified condition.
Declaration
public abstract PageFragment find(Predicate<PageFragment> func)
Parameters
| Name | Type | Description |
|---|---|---|
| func | java.util.function.Predicate<PageFragment> | A predicate that determines whether a fragment matches the search condition. |
Returns
| Type | Description |
|---|---|
| PageFragment | The first matching |
findAll(Predicate<PageFragment> func) Method
Returns all page fragments that match the specified condition.
Declaration
public abstract List<PageFragment> findAll(Predicate<PageFragment> func)
Parameters
| Name | Type | Description |
|---|---|---|
| func | java.util.function.Predicate<PageFragment> | A predicate that determines whether a fragment matches the search condition. |
Returns
| Type | Description |
|---|---|
| java.util.List<PageFragment> | A list of matching |
objectClone() Method
Creates a copy of the current fragment collection.
Declaration
public abstract Object objectClone()
Returns
| Type | Description |
|---|---|
| Object | An |
replace(PageFragment item, PageFragment[] newItems) Method
Replaces an existing page fragment with one or more page fragments.
Declaration
public abstract void replace(PageFragment item, PageFragment[] newItems)
Parameters
| Name | Type | Description |
|---|---|---|
| item | PageFragment | The fragment to replace. |
| newItems | PageFragment[] | Fragments that replace the specified fragment. |
toFlatIterable() Method
Returns an iterable collection that contains all page fragments in a flattened hierarchy.
Declaration
public abstract Iterable<PageFragment> toFlatIterable()
Returns
| Type | Description |
|---|---|
| java.lang.Iterable<PageFragment> | An |
Remarks
Use the toFlatIterable() method to iterate through fragments contained in nested fragment collections.