LinearizationParams
Overview
LinearizationParams is a class in Aspose.Pdf FOSS for Java.
Represents the linearization parameter dictionary (Table F.1, ISO 32000-1:2008).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
version | double | Read | Returns the linearization version (always 1.0). |
fileLength | long | Read | Returns the total file length (/L). |
hintStreamOffset | long | Read | Returns the primary hint stream byte offset (/H[0]). |
hintStreamLength | int | Read | Returns the primary hint stream length (/H[1]). |
firstPageObjNum | int | Read | Returns the first page’s page object number (/O). |
endOfFirstPage | long | Read | Returns the offset of end of first page section (/E). |
numPages | int | Read | Returns the number of pages (/N). |
mainXRefOffset | long | Read | Returns the offset of the main xref table (/T). |
firstPageNumber | int | Read | Returns the first page number (/P), default 0. |
Methods
| Signature | Description |
|---|---|
parse(dict: COSDictionary) → LinearizationParams | Parses linearization parameters from a COSDictionary. |
toDictionary() → COSDictionary | Writes this linearization parameter dictionary as a COS dictionary. |
detect(reader: RandomAccessReader) → LinearizationParams | Detects whether a PDF is linearized by scanning the first 1024 bytes |
| for a linearization parameter dictionary. | |
getVersion() → double | Returns the linearization version (always 1.0). |
getFileLength() → long | Returns the total file length (/L). |
setFileLength(fileLength: long) | |
getHintStreamOffset() → long | Returns the primary hint stream byte offset (/H[0]). |
setHintStreamOffset(offset: long) | |
getHintStreamLength() → int | Returns the primary hint stream length (/H[1]). |
setHintStreamLength(length: int) | |
getFirstPageObjNum() → int | Returns the first page’s page object number (/O). |
setFirstPageObjNum(num: int) | |
getEndOfFirstPage() → long | Returns the offset of end of first page section (/E). |
setEndOfFirstPage(offset: long) | |
getNumPages() → int | Returns the number of pages (/N). |
setNumPages(n: int) | |
getMainXRefOffset() → long | Returns the offset of the main xref table (/T). |
setMainXRefOffset(offset: long) | |
getFirstPageNumber() → int | Returns the first page number (/P), default 0. |
setFirstPageNumber(num: int) | |
isValid(actualFileLength: long) → boolean | Validates that /L matches the actual file length. |