question

qian-0871 avatar image
0 Votes"
qian-0871 asked qian-0871 edited

As OEM print driver vendor, how to support non-standard paper size in PTConvertDevModeToPrintTicket() API?

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

microsoft-graph-print
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

KarlieWeng-MSFT avatar image
0 Votes"
KarlieWeng-MSFT answered qian-0871 commented

Hey @qian-0871

Sorry I'm not print expert, with "windows server print" tag, we mainly focus on the deployment of printer server.

Thanks for your understanding !



If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Best Regards
Karlie

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your reply, Karlie. The Q&A system requires me to add a tag. But I don't know which tag is suitable for this question? May be microsoft-graph-print? Could you indicate? This is a question related to Windows API and print system. But I could not find answer from MSDN. Thanks!

0 Votes 0 ·