PdfMargins.px constructor

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

PdfMargins.px then return in Inches

Implementation

factory PdfMargins.px(
    {int top: 0, int bottom: 0, int left: 0, int right: 0}) {
  return PdfMargins.inches(
    top: _pxToInches(top),
    bottom: _pxToInches(bottom),
    left: _pxToInches(left),
    right: _pxToInches(right),
  );
}