LinearizationParams

LinearizationParams

Overview

LinearizationParams is a class in Aspose.PDF FOSS for Java.

Represents the linearization parameter dictionary (Table F.1, ISO 32000-1:2008).

This class provides 21 methods for working with LinearizationParams objects in Java programs. Available methods include: detect, getEndOfFirstPage, getFileLength, getFirstPageNumber, getFirstPageObjNum, getHintStreamLength, getHintStreamOffset, getMainXRefOffset, getNumPages, getVersion, isValid, parse, and 9 additional methods. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package. Properties: endOfFirstPage, fileLength, firstPageNumber, firstPageObjNum, hintStreamLength, hintStreamOffset, and 3 more.

Properties

NameTypeAccessDescription
versiondoubleReadReturns the linearization version (always 1.0).
fileLengthlongReadReturns the total file length (/L).
hintStreamOffsetlongReadReturns the primary hint stream byte offset (/H[0]).
hintStreamLengthintReadReturns the primary hint stream length (/H[1]).
firstPageObjNumintReadReturns the first page’s page object number (/O).
endOfFirstPagelongReadReturns the offset of end of first page section (/E).
numPagesintReadReturns the number of pages (/N).
mainXRefOffsetlongReadReturns the offset of the main xref table (/T).
firstPageNumberintReadReturns the first page number (/P), default 0.

Methods

SignatureDescription
parse(dict: PdfDictionary)LinearizationParamsParses linearization parameters from a PdfDictionary.
toDictionary()PdfDictionaryWrites this linearization parameter dictionary as a PDF dictionary.
detect(reader: RandomAccessReader)LinearizationParamsDetects whether a PDF is linearized by scanning the first 1024 bytes
for a linearization parameter dictionary.
getVersion()doubleReturns the linearization version (always 1.0).
getFileLength()longReturns the total file length (/L).
setFileLength(fileLength: long)Sets the file length value.
getHintStreamOffset()longReturns the primary hint stream byte offset (/H[0]).
setHintStreamOffset(offset: long)Sets the hint stream offset value.
getHintStreamLength()intReturns the primary hint stream length (/H[1]).
setHintStreamLength(length: int)Sets the hint stream length value.
getFirstPageObjNum()intReturns the first page’s page object number (/O).
setFirstPageObjNum(num: int)Sets the first page obj num value.
getEndOfFirstPage()longReturns the offset of end of first page section (/E).
setEndOfFirstPage(offset: long)Sets the end of first page value.
getNumPages()intReturns the number of pages (/N).
setNumPages(n: int)Sets the num pages value.
getMainXRefOffset()longReturns the offset of the main xref table (/T).
setMainXRefOffset(offset: long)Sets the main x ref offset value.
getFirstPageNumber()intReturns the first page number (/P), default 0.
setFirstPageNumber(num: int)Sets the first page number value.
isValid(actualFileLength: long)booleanValidates that /L matches the actual file length.

See Also

 English