PdfMargins.px constructor

PdfMargins.px({
  1. int? top,
  2. int? bottom,
  3. int? left,
  4. int? right,
})

Implementation

factory PdfMargins.px({int? top, int? bottom, int? left, int? right}) {
  return PdfMargins.inches(
    top: top != null ? _pxToInches(top) : null,
    bottom: bottom != null ? _pxToInches(bottom) : null,
    left: left != null ? _pxToInches(left) : null,
    right: right != null ? _pxToInches(right) : null,
  );
}