GetLinearizedURLAccessPlan
Document inspection, Network reading
Description
Reports the byte-range layout of a remote PDF by fetching only its leading bytes
The probe reads the document header and the linearization dictionary, so it costs a single small range request instead of opening the file
The returned JSON describes the total length, byte-range support, linearization, page count, first-page object and section end, the hint stream span, the main cross-reference offset, and the merged list of byte ranges page 1 requires
Syntax
Delphi
Function TPDFlib.GetLinearizedURLAccessPlan(Const URL: WideString; Out Report: WideString): Integer;DLL
const wchar_t* DLGetLinearizedURLAccessPlan(int InstanceID, const wchar_t* URL);ActiveX
Function PDFlib::GetLinearizedURLAccessPlan(URL As String, ByRef Report As String) As LongParameters
| URL | The http or https address of the remote PDF |
|---|---|
| Report | Receives the JSON access plan, or an error object when the resource cannot be probed |
Return values
| 1 | The plan was built and returned in Report |
|---|---|
| 0 | The resource could not be probed; LastErrorCode is set to PDFLIB_ERROR_NET_OPEN or PDFLIB_ERROR_NET_HTTP |
Remarks
The firstPageRanges array is the minimal set of byte ranges a client should fetch to paint page 1, with the first-page section starting at byte 0 and ending at firstPageSectionEnd
For a non-linearized document the plan still reports the size and range support, but isLinearized is false and the range list stays empty
Use DAOpenFromURL to open and render the document once the layout is known