alanmusician
Programmer
I am trying to get a list of custom paper sizes to populate a combobox. So far I have the list for the selected printer, but it doesn't include custom paper sizes. Instead, at the end of the list it has an item named "Custom..." with a RawKind of 256.
Above is the code that I am using. Where else do I need to look for the paper sizes?
Code:
List<PaperSize> paperSizes = new List<PaperSize>();
foreach (PaperSize paperSize in testDocument.PrinterSettings.PaperSizes)
{
if (paperSize.Kind != PaperKind.Custom)
{
paperSizes.Add(paperSize);
}
}
Above is the code that I am using. Where else do I need to look for the paper sizes?