• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Symbol Functions
      • Item Functions
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Case Object
      • Document Object
        • Document Statement
        • Document.load Function
        • Document.save Function
        • Document.view Function
        • Document.clear Function
      • File Object
      • Freq Object
      • Geometry Object
      • HashMap Object
      • Image Object
      • List Object
      • Map Object
      • Path
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Document.view Function

Format
b = document_name.view(ʃviewer_argumentsʅ);
Description
The Document.view function displays the contents of the file stored in a Document object.
If the Document contains data that can be displayed using an embedded web brower, the content is shown in an embedded window. For other types of data, an external application is launched to display the data using the system's default viewer for that file type.
Viewer Arguments
Optional named arguments can be used to control how the embedded web browser displays on Windows:
  • title := string expression giving the title of the window.
  • width := numeric expression specifying the width of the window in display units.
  • height := numeric expression specifying the height of the window in display units.
  • showCloseButton := conditional expression that, if false, hides the window's Close button.
If either the height or width is specified, then both values must be provided. Hiding the Close button also removes the margin around the web browser, so the browser will fill the entire embedded window.
Return Value
The function returns a logical value of 1 (true) if the file was displayed, 0 (false) if there was an error viewing the file, and default if the Document object was empty.
Example
Document manual;
manual.
load("Farmers Markets Survey.pdf");
manual.
view();
See also: Document Object