public class DefaultPageTreeListFactory extends Object implements IPageTreeListFactory
IPageTreeListFactory that is used as a default.
This class will create an arraylist when in creation mode. In reading and editing mode, it will create a NullUnlimitedList if the count is greater than the maxEntriesBeforeSwitchingToNullUnlimitedList. This is to prevent potential OOM exceptions when loading a document with a large number of pages where only a few pages are needed.
| Constructor and Description |
|---|
DefaultPageTreeListFactory(int maxEntriesBeforeSwitchingToNullUnlimitedList)
Creates a new instance of DefaultPageTreeListFactory.
|
| Modifier and Type | Method and Description |
|---|---|
<T> com.itextpdf.commons.datastructures.ISimpleList<T> |
createList(PdfDictionary pagesDictionary)
Creates a list based on the count value in the pages dictionary.
|
public DefaultPageTreeListFactory(int maxEntriesBeforeSwitchingToNullUnlimitedList)
maxEntriesBeforeSwitchingToNullUnlimitedList - the maximum number of entries before switching to
a NullUnlimitedList.public <T> com.itextpdf.commons.datastructures.ISimpleList<T> createList(PdfDictionary pagesDictionary)
createList in interface IPageTreeListFactoryT - The type of the listpagesDictionary - The pages dictionaryCopyright © 1998–2025 Apryse Group NV. All rights reserved.