apply method

PdfPageFormat apply(
  1. PageOrientation orientation
)

apply API.

Implementation

PdfPageFormat apply(PageOrientation orientation) {
  return switch (orientation) {
    PageOrientation.landscape => landscape,
    PageOrientation.portrait => width <= height
        ? this
        : PdfPageFormat(
            height,
            width,
            marginAll: marginLeft,
          ),
    PageOrientation.natural => this,
  };
}