We are developing a print driver. To better support Print Ticket for win32 applications, we implemented IPrintTicketProvider COM interface. But it is found that when applications call PTConvertPrintTicketToDevMode(), and the paper size in Print Ticket is vendor defined paper size (aka non-standard paper size, refer to https://docs.microsoft.com/en-us/windows-hardware/drivers/print/supporting-vendor-defined-paper-sizes), the paper size in converted DevMode is always default paper size. It seems system don't recognize the private option in Print Ticket.
Per the MSDN https://docs.microsoft.com/en-us/previous-versions/windows/hardware/drivers/ff554354(v=vs.85), we could set corresponding bit to indicate system not to do DEVMODEW-to-print ticket or print ticket-to-DEVMODEW conversions, then PTConvertPrintTicketToDevMode() can convert non-standard paper size correctly.
Could any print experts tell me whether this is correct method to support non-standard paper size in PTConvertDevModeToPrintTicket() API? Thanks