Package com.pdftools.toolbox.pdf
Class PageList
- java.lang.Object
-
- com.pdftools.toolbox.internal.NativeBase
-
- com.pdftools.toolbox.internal.NativeObject
-
- com.pdftools.toolbox.pdf.PageList
-
- All Implemented Interfaces:
java.lang.Iterable<Page>
,java.util.Collection<Page>
,java.util.List<Page>
public class PageList extends NativeObject implements java.util.List<Page>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, Page element)
Not supported.boolean
add(Page element)
boolean
addAll(int index, java.util.Collection<? extends Page> elements)
boolean
addAll(java.util.Collection<? extends Page> elements)
void
clear()
Not supported.boolean
contains(java.lang.Object object)
boolean
containsAll(java.util.Collection<?> objects)
static PageList
copy(Document targetDocument, PageList pageList, PageCopyOptions options)
Copy a page listPage
get(int index)
int
indexOf(java.lang.Object obj)
boolean
isEmpty()
java.util.Iterator<Page>
iterator()
int
lastIndexOf(java.lang.Object obj)
java.util.ListIterator<Page>
listIterator()
java.util.ListIterator<Page>
listIterator(int index)
Page
remove(int index)
Not supported.boolean
remove(java.lang.Object object)
Not supported.boolean
removeAll(java.util.Collection<?> objects)
Not supported.boolean
retainAll(java.util.Collection<?> objects)
Not supported.Page
set(int index, Page element)
Not supported.int
size()
PageList
subList(int fromIndex, int toIndex)
java.lang.Object[]
toArray()
<T> T[]
toArray(T[] array)
-
Methods inherited from class com.pdftools.toolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
copy
public static PageList copy(Document targetDocument, PageList pageList, PageCopyOptions options) throws java.io.IOException, CorruptException, ConformanceException
Copy a page list
Copy pages from an input document to the giventargetDocument
. The returned list is associated with the given target document but not yet part of it. It can be appended to the document's page list.- Parameters:
targetDocument
- the output document with which the returned object is associatedpageList
- a page list of a different documentoptions
- the copy options- Returns:
- the copied page list, associated with the target document.
- Throws:
java.io.IOException
- Error reading from the source document or writing to the target documentCorruptException
- The source document is corruptConformanceException
- The conformance level of the source document is not compatible with the conformance level of the target document.ConformanceException
- The explicitly requested conformance level is PDF/A Level A (Conformance.PDF_A1_A
,Conformance.PDF_A2_A
, orConformance.PDF_A3_A
) and the copy optionPageCopyOptions.getCopyLogicalStructure()
is not set.java.lang.IllegalArgumentException
- if thetargetDocument
argument has already been closedjava.lang.IllegalArgumentException
- if thetargetDocument
argument is read-onlyjava.lang.IllegalArgumentException
- if thepageList
object is not associated with an input documentjava.lang.IllegalArgumentException
- if the document associated withpageList
has already been closedjava.lang.IllegalArgumentException
- if the argumentoptions
hasPageCopyOptions.getFormFields()
set toforms.FormFieldCopyStrategy.COPY
and thetargetDocument
contains form fields that have either been copied explicitly withforms.FieldNode.copy
or created withforms.CheckBox.create
,forms.ComboBox.create
,forms.CombTextField.create
,forms.GeneralTextField.create
,forms.ListBox.create
,forms.RadioButtonGroup.create
, orforms.SubForm.create
.java.lang.IllegalArgumentException
- if the argumentoptions
hasPageCopyOptions.getUnsignedSignatures()
set toCopyStrategy.COPY
and thetargetDocument
contains form fields that have either been copied explicitly withforms.FieldNode.copy
or created withforms.CheckBox.create
,forms.ComboBox.create
,forms.CombTextField.create
,forms.GeneralTextField.create
,forms.ListBox.create
,forms.RadioButtonGroup.create
, orforms.SubForm.create
.java.lang.IllegalArgumentException
- ifoptions
hasPageCopyOptions.getCopyOutlineItems()
set totrue
and thetargetDocument
contains outline items that have been copied explicitly withnavigation.OutlineItem.copy
.java.lang.IllegalArgumentException
- iftargetDocument
isnull
java.lang.IllegalArgumentException
- ifpageList
isnull
-
addAll
public boolean addAll(java.util.Collection<? extends Page> elements)
-
addAll
public boolean addAll(int index, java.util.Collection<? extends Page> elements)
- Specified by:
addAll
in interfacejava.util.List<Page>
-
contains
public boolean contains(java.lang.Object object)
-
containsAll
public boolean containsAll(java.util.Collection<?> objects)
-
isEmpty
public boolean isEmpty()
-
iterator
public java.util.Iterator<Page> iterator()
-
listIterator
public java.util.ListIterator<Page> listIterator()
- Specified by:
listIterator
in interfacejava.util.List<Page>
-
listIterator
public java.util.ListIterator<Page> listIterator(int index)
- Specified by:
listIterator
in interfacejava.util.List<Page>
-
remove
public boolean remove(java.lang.Object object)
Not supported.
-
removeAll
public boolean removeAll(java.util.Collection<?> objects)
Not supported.
-
retainAll
public boolean retainAll(java.util.Collection<?> objects)
Not supported.
-
subList
public PageList subList(int fromIndex, int toIndex)
- Specified by:
subList
in interfacejava.util.List<Page>
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <T> T[] toArray(T[] array)
-
size
public int size()
-
clear
public void clear()
Not supported.
-
indexOf
public int indexOf(java.lang.Object obj)
- Specified by:
indexOf
in interfacejava.util.List<Page>
-
lastIndexOf
public int lastIndexOf(java.lang.Object obj)
- Specified by:
lastIndexOf
in interfacejava.util.List<Page>
-
add
public boolean add(Page element)
-
add
public void add(int index, Page element)
Not supported.- Specified by:
add
in interfacejava.util.List<Page>
-
remove
public Page remove(int index)
Not supported.- Specified by:
remove
in interfacejava.util.List<Page>
-
-