Display an HTML Document on Interface

Certified Senior Developer

Hello, 

I would like to display an HTML document in an Appian Interface. I don't want to download the document but instead I want to be able to just show it.

I've tried using a couple of components like "DocumentViewerField and WebContentField". However, both have problems.

WebContentField throws an error if the content is from the same domain

DocumentViewerField does not display the HTML

What is another way to do this?

Basically, my use case is to display the HTML document and be able to click on a button link to an external application.

Regards,

Le

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    The way I've handled this before:

    1) create a temporary PDF copy of the HTML file  (note: the HTML will be flattened and will be purely "read-only" in functionality.  it MIGHT still allow clickable hyperlinks, but you'd have to try it to be sure)

    2) display the PDF file using the standard Document Viewer Field.

    You can create a PDF of an HTML file using, among other things, the PDF from HTML smart service in the Dynamic Document Generator plug-in.  The main caveat here is that the resulting PDF might vary in quality depending on the HTML file it's fed.  But I've used this technique to some degree of success at least once in the past.

    Honestly though if your primary use case is to provide the user a link to an external URL, just use an a!safeLink() for that.  Stuff shown in the Document Viewer Field should be assumed as non-interactive IMHO.

Reply Children
No Data