---
title: Print rendered PDF
summary: Sends an already-rendered PDF byte array to the configured printer through the xPression print service.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-30
library: SAIF.Services.Printing
reference_type: package
operation_id: OP-PRT-02
trigger: Caller invokes clsPrint.printPDF with rendered PDF bytes
---

# Print rendered PDF

`clsPrint.printPDF` sends a byte array the caller already has (typically produced by a preview or render step) to a physical or virtual printer through the xPression print service. It does not render or fetch content itself; it is purely the transport step.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-PRT-02 |
| **Trigger** | Caller invokes `clsPrint.printPDF(inFile)` after obtaining rendered PDF bytes (for example, from [Preview document via xPression](preview-document-via-xpression.md) or [Render report](render-report.md)) |
| **Inputs** | PDF byte array; printer name, plex mode, copy count, and scale mode set on the `clsPrint` instance beforehand |
| **Outputs** | Boolean `True` returned after the print call completes |
| **Primary components** | `clsPrint.printPDF` |
| **Entry point** | `Services\SAIF.Services.Printing\clsPrint.vb` |

## Steps

1. The caller sets `Printer`, `PlexMode`, `Copies`, and `ScaleMode` on the `clsPrint` instance before calling `printPDF` (directly, or through `ReportBase.Print`, see [Print report](print-report.md)).
2. The caller invokes `printPDF(inFile)`, passing the PDF byte array to print.
3. `printPDF` forwards the byte array along with `m_Printer`, `m_Plexmode`, `m_Copies`, and `m_Scalemode` to `m_Xpresso.printPDF` on the generated xPression SOAP proxy.
4. The method returns `True` immediately after the proxy call completes; the return value does not reflect the printer's actual job status, only that the SOAP call did not throw.

## Process flow

The following diagram visualizes the print call.

```mermaid
flowchart TD
	Start([Caller has rendered PDF bytes]) --> Settings[Set Printer, PlexMode,<br>Copies, ScaleMode]
	Settings --> Call[Call clsPrint.printPDF]
	Call --> Proxy[xpresso.clsGenerate.printPDF]
	Proxy --> End([Return True])
```

## Failure and edge-case behavior

- `printPDF` does not catch exceptions; a SOAP fault or communication failure from `m_Xpresso.printPDF` propagates directly to the caller.*
- The method always returns `True` when the proxy call does not throw, so a caller cannot distinguish "printer accepted the job" from "printer queued but later failed" using this return value alone.*

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- `Services\SAIF.Services.Printing\clsPrint.vb`
