updateBates method
Replaces the document Bates numbering configuration.
example:
final pageCount = await controller.document.getPageCount();
final success = await controller.document.updateBates(
CPDFBates(
pages: List<int>.generate(pageCount, (index) => index),
margin: const EdgeInsets.fromLTRB(36, 24, 36, 24),
pageOffset: 0,
slots: const <CPDFHeaderFooterSlot>[
CPDFHeaderFooterSlot(
position: CPDFHeaderFooterPosition.footerRight,
text: 'CASE-<<#5#1#>>',
fontSize: 12,
),
],
),
);
Implementation
Future<bool> updateBates(CPDFBates bates) async {
final validationError = bates.validate();
if (validationError != null) {
debugPrint('updateBates error: $validationError');
return false;
}
return await _channel.invokeMethod('update_bates', bates.toJson());
}