Knowledge Base - Pdf linearization management

With setOpenFlag you can modify a flag affecting how pdf pages are loaded.


void Document_setOpenFlag(int flag); (Android)

Document.SetOpenFlag(int flag)

There are 3 possible options:

0: Ignore linearized PDF, always load pages from normal corss reference table. 

1: Load linearized header and read all pages object to record page size. (default behaviour)

3: Load linearized header, but only read first page and record other pages size same to first page.

The flag is a global setting, which effects all Document.OpenXXX() methods.


PDFDoc *doc = [[PDFDoc alloc] init];


int error = [doc openStream:httpStream :@""];


m_doc = new Document();
int ret = m_doc.OpenStream(m_http_stream, pdf_pswd); 

With getLinearizedOption you can check linearized pdf status.


int Document_getLinearizedStatus(PDF_DOC doc);

There are 4 possible options:

0: Linearized header not loaded or no linearized header. (setOpenFlag(0) cause always return 0)

1: There is linearized header, but linearized entry checked as failed.

2: There is linearized header, linearized entry checked succeeded, but hint table is damaged.

3: Linearized header loaded succeeded.


int status = [doc getLinearizedStatus]; 


int status = doc.getLinearizedStatus(); 

Applies To

RadaeePDF SDK for Android, RadaeePDF SDK for iOS


Created : 2020-08-18 14:26:05, Last Modified : 2020-08-20 14:44:18