Windows Protected Print Mode – Silent PDF output with “Microsoft Print to PDF” no longer possible

Patrick Poly 0 Reputation points
2025-09-26T09:04:44.5066667+00:00

Hello,

In our application (C++win32) we use Microsoft Print to PDF to generate PDF files silently.

  • With WPPM disabled, the flow works:
    • With GDI we provide the output stream using StartDocW.
    • With Direct2D/XPS we use CreateDocumentPackageTargetForPrintJob.

When WPPM is enabled, behavior changes:

The print job is accepted but remains stuck in the spooler with an error.

No PDF file is created.

Questions:

Is this behavior by design (file output blocked in protected mode)?

Is there an official reference documenting that file-based output ports (like “Microsoft Print to PDF”) are not supported when WPPM is enabled?

What is the recommended approach for developers needing non-interactive PDF output under WPPM?

This clarification is critical for us to explain to our customers why silent PDF output is no longer possible when WPPM is active.

Thank you.

Windows development | Windows API - Win32

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.