What does HRESULT 0x8899002B (D2DERR_PRINT_JOB_CLOSED) mean?

 
Previous Next
D2DERR_NO_SUBPROPERTIES D2DERR_PRINT_FORMAT_NOT_SUPPORTED

D2DERR_PRINT_JOB_CLOSED

D2DERR_PRINT_JOB_CLOSED belongs to Direct2D print-control lifetime. AddPage or Close was called after the Direct2D print job had already been closed. The diagnostic goal for it is to identify the first rejecting object and transition, not merely the final high-level symptom.

Locate the first rejecting layer

A Direct2D print control has a one-way lifecycle: pages are submitted while the job is open and Close ends that generation., late asynchronous callbacks or duplicate cleanup can call AddPage or Close after termination even when the page content and printer are valid.

Inspect the following boundary: print-control lifecycle and duplicate or late page submission.

Controlled reproduction

Serialize one AddPage and one Close, tag the job generation, and reject callbacks from completed jobs. Create a new print control for a new document instead of attempting to reopen the closed object.

  1. submit one page then close exactly once.
  2. When it is returned, serialize close with page production.
  3. Reject late callbacks from an older job generation.
  4. create a new print control for a new document.

Evidence that changes the diagnosis

RecordWhy it matters here
Job creation, AddPage, and Close timestampsPreserving job creation, AddPage, and Close timestamps provides the evidence needed to test this distinction: this is a state-machine error, not a printer capability or page-content rendering error.
Thread and asynchronous print callbackRecording thread and asynchronous print callback separates the Direct2D print-control lifetime boundary from a later wrapper symptom.
Spooler result and document generationIn this result diagnostics, recording spooler result and document generation ties the HRESULT to the Direct2D print-control lifetime boundary rather than to the final visible failure.
Object generation and cancellation stateComparing object generation and cancellation state shows whether this result follows input, object state, or environment.

Comparison tests

TestInterpretationHold constant
Same environment, reduced inputIf this result disappears with a smaller faithful case, complexity within Direct2D print-control lifetime is implicated.Keep job creation, AddPage, and Close timestamps fixed while simplifying spooler result and document generation.
Same input, fresh object generationIf this result changes after rebuilding state, examine ownership across the caller’s object graph, custom effect or renderer, Direct2D validation layer, backing device, and deferred draw boundary.Place thread and asynchronous print callback on the timeline of the last successful transition.
Same operation on a controlled second pathIf this result follows one environment, the failure is not explained by source data alone.Compare adapter and feature level, factory and device generations, target identity, debug-layer output, and thread ownership while preserving object generation and cancellation state.

Misleading responses

This is a state-machine error, not a printer capability or page-content rendering error. Do not respond with a universal render-target recreation loop unless the returned status specifically documents device-loss recovery; graph, property, numeric, lifetime, and print-state errors require correcting their contract.

Closure criteria

A correction for it should let the operation at the Direct2D print-control lifetime boundary complete repeatedly under the original supported conditions. Repeat the control that begins with “Submit one page then close exactly once” and confirm that the following lifecycle step also succeeds. Keep the original failing sample and one deliberate negative case so fallback cannot be mistaken for repair.

Technical references

When it is returned, these references define the public API family, object model, or error list used to interpret this status.


Looking for a different code? Search another status or error code.