Skip to main content
pierpaolol0001
March 30, 2023
Question

Extension allowed for the Document Viewer

  • March 30, 2023
  • 6 replies
  • 0 views

Hi everyone, how can I obtain the list of the extension of files that are shown in an interface by the document viewer?
I checked the documentation and there are no indications or lists about the formats allowed.

6 replies

stefanhelzle0001
Brainy
March 30, 2023

AFAIK, this is PDF and image formats. In case you hope for Office formats, you will be disappointed.

March 30, 2023

There is no list of supported extensions provided by Appian as such, but PDF files are always supported for preview. Can you tell us about your use case, I'm sure there can be some workarounds.

pierpaolol0001
March 31, 2023

Hi, it's just a request from my client. They want to know which formats they can enjoy through an Appian document viewer.

harshitb6843
March 31, 2023

I guess PDF, PNG, JPEG, and JPG. You can try it with other formats like WEBP, GIF, DOCX, etc. 

mallepup3914
March 31, 2023

Hi [mention:37c57cf95dd64be9bdd8aad091affc6a:e9ed411860ed4f2ba0265705b8793d05]

As mentioned, you can display only PDF and image formats. However, if you want to display/preview any other formats you need to convert that doc into pdf for that instance and display. We do have few plugins to do that like : Plug-In

mikes0011
Brainy
March 31, 2023

Despite what others here have already said: you can also open Text files (i.e. ".txt", aka plaintext) in the Document Viewer field.  This is the only common file format (other than images) that I've confirmed can be previewed, beyond PDF files.

FWIW, For image files, I always recommend using a!imageField() instead (they'll open in the Document Preview field but it works a little weirdly).  Some time ago I developed a tool that you can pass a file into, and it automatically checks whether the file type is previewable (and whether it's an image), and chooses the appropriate viewer.  If it's not a previewable type, it simply displays a download link.

The Expression Guru