From MSDN (link):
The type PrintDocumentImageableArea
has no public constructor. Hence, the
variable documentImageableArea must be
declared and assigned to Nothing and
only then passed to the method. This
method displays a PrintDialog
requiring input from the user. After
the user has selected a printer, paper
size, and orientation and closed the
dialog, documentImageableArea points
to an actual object and its properties
are initialized.
I have my custom print dialog and need to get the PrintDocumentImageableArea of a given PrintQueue and PrintTicket! (I need the margin’s I need to apply)
From what I can gather it is quite common for anything but the most basic applications to use their own custom print dialog. There must be a way to get to this information!?
Any input appreciated!
Use the GetPrintCapabilities() method of the PrintQueue and then query the PageImageableArea.
More information here:
http://msdn.microsoft.com/en-us/library/system.printing.printcapabilities.pageimageablearea(v=VS.90).aspx
and here:
http://msdn.microsoft.com/en-us/library/ms552920.aspx