Skip to content

Preview a document via xPression

Renders an xPression Design document/package into PDF bytes for preview, without printing or distributing it.

Field Value
Operation ID OP-PRINT-PREVIEW
Trigger Caller calls previewDocument(package, xml) (overload) or the parameterless previewDocument()/previewPDF() after setting Package/XML properties
Inputs Package (trimmed, .pkg extension stripped if present), XML, OutputProfile, Application
Outputs Rendered document bytes (Byte(), PDF)
Primary components clsPrint.previewDocument, clsPrint.previewPDF
Entry point SAIF.Services.Printing\clsPrint.vb

Steps

  1. Caller sets Package (trims value, strips a trailing .pkg extension if present) and XML properties, or calls the overload that sets them directly.
  2. previewDocument() (private, parameterless) delegates to m_Xpresso.previewDocument(m_Package, m_XML, m_OutputProfile, m_Application) — a synchronous SOAP call to the xpresso.clsGenerate proxy.

    Origin: This step is implemented in xpresso.clsGenerate (SAIF.Services.Printing.xpresso, auto-generated SOAP client proxy) and executed against the external xPression Design server; no further local step trace is available for the external service call.*

  3. previewPDF follows the same pattern but calls m_Xpresso.previewPDF(...) and forces Application = "xPression Design".
  4. Returns the rendered document as a Byte() array (PDF bytes) to the caller; no local persistence or business-rule enforcement occurs in this operation.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Caller sets Package/XML]) --> Call[Call m_Xpresso.previewDocument or previewPDF]
    Call --> Soap[SOAP call to external xPression server]
    Soap --> Return([Return PDF bytes])

Failure and edge-case behavior

  • No local validation of Package/XML occurs beyond trimming and .pkg suffix stripping.
  • SOAP faults from the external xPression server propagate directly to the caller; no local exception handling wraps this call.*

Sources

  • SAIF.Services.Printing\clsPrint.vb
  • SAIF.Services.Printing\Web References\xpresso\Reference.vb