Skip to content

Preview as PDF

Renders a package name and xPression data XML specifically as a PDF, returning the rendered PDF bytes without printing or distributing the result.

Field Value
Operation ID OP-02
Trigger clsPrint.previewPDF invoked
Inputs Package name, xPression data XML
Outputs PDF bytes (Byte())
Primary components clsPrint.previewPDF, private xpreviewPDF, m_Xpresso.previewPDF
Entry point SAIF.Services.Printing/clsPrint.vb

Steps

  1. Trims and assigns inPackage to the Package property. The package name is normalized by stripping a trailing .pkg extension via the Package setter (BR-PRT-001) — the same normalization applied in Preview a document.
  2. Assigns inXML to the XML property.
  3. Calls the private xpreviewPDF(m_Package, inXML, "xPression Design"), a thin pass-through to m_Xpresso.previewPDF(inDocumentName, inXML, inApplication).
  4. The application name "xPression Design" is passed as a hard-coded literal rather than the m_Application field used implicitly by Preview a document's private previewDocument(). Both happen to default to the same string, but this operation's call site is structurally distinct: it cannot be overridden by setting the Application property.*
  5. Returns the PDF bytes from m_Xpresso.previewPDF directly to the caller.

Process flow

flowchart TD
    Start(["previewPDF invoked"]) --> Norm["Normalize package name"]
    Norm --> SetXML["Set XML"]
    SetXML --> Call["xpreviewPDF<br>(hard-coded<br>'xPression Design')"]
    Call --> Svc["m_Xpresso.previewPDF"]
    Svc --> End(["Return PDF bytes"])

Failure and edge-case behavior

  • There is no try/catch around the web service call, the same as Preview a document; any exception raised by m_Xpresso.previewPDF propagates directly to the caller.
  • This entry point has no output-profile parameter; PDF is implied by the method itself rather than by a caller-supplied or instance-level OutputProfile value.

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

  • SAIF.Services.Printing/clsPrint.vb