rotation property

Gets or sets the rotation of PDF page

This property only works on existing PDF document pages

//Create a new PDF document.
PdfDocument document = PdfDocument(inputBytes: data);
//Rotation of the PDF page
PdfPageRotateAngle rotation = document.pages[0].rotation;
//Save the document.
List<int> bytes = await;
//Dispose the document.


PdfPageRotateAngle get rotation {
  _rotation ??= _obtainRotation();
  return _rotation!;
void rotation=(PdfPageRotateAngle angle)


set rotation(PdfPageRotateAngle angle) {
  if (_helper.isLoadedPage && rotation != angle) {
    _rotation = angle;
    _helper.dictionary![PdfDictionaryProperties.rotate] =
        PdfNumber(PdfSectionCollectionHelper.rotateFactor * angle.index);