Embed a PDF document in a Metastorm form [Quick Tip]

The OpenText Process Suite ABC Glossary - WS AppServer Package part 1

There are requirments to to display PDF documents (e.g. Invoices, Purchase Orders, Incoming Letters) on a OpenText MBPM (formerly Metastorm BPM) form. There are different ways to implement this: using a PDF viewer component like Brava Viewer or TiffServer, the iFrame or the HTML <object> tag method.

Today we will share this quick tip to display a PDF using the object tag.

Definition and usuage of the HTML <object> tag

The <object> tag defines an embedded object within an HTML document. Use this element to embed multimedia (like audio, video, Java applets, ActiveX, PDF, and Flash) in your web pages.

You can also use the <object> tag to embed another webpage into your HTML document.

Use the <object> tag in a MBPM form

  1. Create a OpenText MBPM Server Side Script and add the following method

    public static string EmbedPDF(string FileUrl, string FileName)
    {
    return @"<object width='100%' height='100%' data='" + FileUrl +"' type='application/pdf' standby='Loading...' name='" + FileName + "_Embedded'></object>";
    }

  2. Create a Metastorm form
  3. Add a label control
  4. Make the label calculated
  5. Call the EmbedPDF method from the Expression Builder
  6. At runtime the PDF will be loaded into the area defined as a label

I hope you find this OpenText MBPM/Metastorm BPM Quick Tip useful. Do you have another solution for the same requirement? Feel free to post your approach as a comment. 

Metastorm BPM Health Check