Home > Forum > General > Document viewer

Document viewer


I am currently exploring options for viewing documents within Webcon. Specifically, I am interested in understanding whether there is a possibility to visualize a document by providing a link that points to a document stored either on SharePoint or within a SQL Server database.
My goal is to enable the automatic display of the associated document in preview mode when a user selects a record in the application.

Has anyone had experience or insights into achieving this integration? If so, could you please share any guidance, tips, or recommended approaches to enable document viewing through Webcon using links from SharePoint or a SQL Server database?

Thank you.


Hi Maria,

SharePoint only
If these documents can be displayed in SharePoint for example Word documents, I would check the URL and see whether you could use this URL as the source of an iFrame. If this is possible, there may be security restrictions and I have no idea, whether you can change them, you could modify dynamic parts of the URL to display the document.
This would be my first approach.

SDK approach
The SDK contains the CustomFilesManager. This allows you to upload a document to the database with an expiration date.
Afterwards you can call GetUrl with FileViewMode preview

I have used this for testing purposes ones in the past. I suspect that all file types are supported, which can currently displayed in preview. This approach could work for SharePoint and SQL. But it's an overhead and for SharePoint I would test the previous one first.

Best regards,

In reply to: MariaM

I have tried using an HTML form field and it is not working. It says "company.sharepoint.com refused to connect".

Is there a possibilty to create a sdk form field that may offer a preview?

Hi Maria,

the problem here is, that SharePoint Online doesn't allow to be hosted /embedded on all websites (domains). These need to be whitelisted. It won't make a difference how the iFrame would be added.
By the way, the same applies to WEBCON BPS too.

While I know that you can set these using the Content-Security-Policy in WEBCON I have no idea how to set them in SharePoint Online.

Maybe you find something online if you search for Content-Security-Policy. I didn't find a solution only questions like these:

Best regards,