How do I find PageImagableArea for other papersizes

269 Views Asked by At

Im trying to fix a scaling issue when our application prints on other papersizes then A4. There is an existing method called GetPrintableArea, but it returns the same values regardless of what mediaSize is:

public Size GetPrintableArea(PageMediaSize mediaSize)
 {
  _printQueue.CurrentJobSettings.CurrentPrintTicket.PageMediaSize = mediaSize;
  var capabilities = _printQueue.GetPrintCapabilities(_printQueue.CurrentJobSettings.CurrentPrintTicket);
  return new Size(capabilities.PageImageableArea.ExtentWidth, capabilities.PageImageableArea.ExtentHeight);
 }

capabilities.PageImageableArea W/H is always set to the same values (761, 1090). And as far as I can see this is the selected printers imageable area for A4 (in 1/96" units). How do I get the printers PageImageableArea for other papersizes like for example A3?

0

There are 0 best solutions below