rotatePage method
Implementation
Future<void> rotatePage(int index, int degrees) async {
final UPdfDict? page = await mutablePage(index);
if (page == null) return;
final Object? current = await document.resolve(page["Rotate"]);
final int base = current is num ? current.toInt() : 0;
page["Rotate"] = ((base + degrees) % 360 + 360) % 360;
}