rotatePdf method

Future<ApiResponse> rotatePdf(
  1. File file,
  2. List<PageRotation> rotations
)

Rotate PDF pages

file PDF file to rotate rotations List of page rotations

Implementation

Future<ApiResponse> rotatePdf(File file, List<PageRotation> rotations) async {
  return client.uploadFile(
    '/api/pdf/rotate',
    'file',
    file,
    fields: {
      'rotations': json.encode(rotations.map((r) => r.toJson()).toList()),
    },
  );
}