setDocumentFfi function
Set the Pdf document data
Implementation
void setDocumentFfi(PrintJob job, Uint8List data) {
final nativeBytes = ffi.calloc<ffi.Uint8>(data.length);
nativeBytes.asTypedList(data.length).setAll(0, data);
_setDocument(job.index, nativeBytes, data.length);
ffi.calloc.free(nativeBytes);
}