Document.from_data


Description:

[ CCode ( has_construct_function = false ) ]
[ Version ( deprecated = true , deprecated_since = "0.82" ) ]
public Document.from_data (uint8[] data, string? password) throws Error

Warning: Document.from_data is deprecated since 0.82.

Creates a new Document.

Note:

This requires directly managing data.length and data.

Use Document.from_bytes instead.

If null is returned, then error will be set. Possible errors include those in the Error and FileError domains.

Note that data is not copied nor is a new reference to it created. It must remain valid and cannot be destroyed as long as the returned document exists.

Parameters:

data

the pdf data

password

password to unlock the file with, or null

length

the length of data

Returns:

A newly created Document, or null