Skip to content

Print rendered bytes

Sends an already-rendered byte array to a physical printer via the xPression Design service, using the current instance-level printer, plex mode, copy count, and scale mode settings.

Field Value
Operation ID OP-03
Trigger clsPrint.printPDF invoked
Inputs inFile As Byte(), plus instance state Printer, PlexMode, Copies, ScaleMode
Outputs True (unconditional)
Primary components clsPrint.printPDF, m_Xpresso.printPDF
Entry point SAIF.Services.Printing/clsPrint.vb

Steps

  1. Calls m_Xpresso.printPDF(inFile, m_Printer, m_Plexmode, m_Copies, m_Scalemode) against the xPression web service, passing the already-rendered bytes together with the current printer, plex mode, copy count, and scale mode state.
  2. There is no validation of inFile before the call — a Nothing or empty byte array is passed through as-is.
  3. Returns True unconditionally regardless of what the web service call actually did (BR-PRT-013).
  4. On failure: the web service call can still throw; if it does, the exception propagates and the True return is never reached — the unconditional True only covers the case where the call completed without throwing.

Process flow

flowchart TD
    Start(["printPDF invoked"]) --> Call["m_Xpresso.printPDF<br>(bytes, printer, plex, copies, scale)"]
    Call -->|"No exception"| End(["Return True"])
    Call -->|"Exception"| Err(["Exception propagates<br>(True never reached)"])

Failure and edge-case behavior

  • BR-PRT-013 is central to this operation: a caller cannot distinguish "printed successfully" from "silently no-op'd" via the return value alone — only a thrown exception signals failure.
  • No validation of inFile occurs before the call to m_Xpresso.printPDF.

Sources

  • SAIF.Services.Printing/clsPrint.vb