Home Forums Presentation Applications Open Document in Document Viewer

Viewing 2 reply threads
  • Author
    • #9323
      Pravin Jaiswalpravin jaiswal

      We want to open document in document viewer. In UI we show the document name, when user double click the name, we call an external document retrieval API which returns document as binary stream.

      We want to open the document in UI whenever the user double click on the document name. Please suggest me  how to achieve this functionality. Do we have any existing control to open the document in UI?

    • #9331
      Owen PondOwen Pond

      Hi Pravin,

      From the form controller you can call ‘personalizedPrint. This will call out to a static event in the model. That event should return a transfer object similar to the one below:

      (: fileName “FileNameWithExtension”)
      (: data [BinaryFileData])



    • #9340
      Clayton ChowClayton Chow

      Hi Pravin,


      In short:

      1. The user double-click will through a UI-Event (e.g. sysProperties)
      2. That corresponding “sysProperties” UI Action should return the “PersonalizedPrint” function of the ScriptedController.  This function will return a personalized attachment and display it in the native program (see signature definition below).
      3. For a reference, please look at other “personalizedPrint” uses in other Forms or Screens.
        1. Essentially, the methodSyn event should return a File type message.

      There is a similar functionality in your project as well (TEAttachment’getOperationalDocument) which grabs the file data from a webservice and then returns it to the UI to be opened by the browser.





      public personalizedPrint(classSym methodSym values);
      classSym symbol ClassSym of the document class.
      methodSym symbol Personalized print method symbol on the document
      values pair Method parameters

Viewing 2 reply threads
  • You must be logged in to reply to this topic.