Open document in IFrame

Hello


I’m testing a free trial of GroupDocs.Viewer and I’m trying do create this kind of scenario:
There is an IFrame on my page, which shows documents. Let’s say client have a *.docx file, he clicks it and it should opened in this IFrame using GroupDocs.Viewer. Everything should work automatically from code. No manual file selecting.
Is this kind of situation possible with your product?

I also have a second, but less important question - can I customize how your Viewer looks like? I’m thinking mostly about buttons, because they don’r really fit to page design :slight_smile:

Thanks in advance for every response.

Hello,


Thank you for using GroupDocs. Yes, this is possible. Please investigate this article for how to load a document on click, you need loadDocument method.

As for the style changes - yes, you can do it. You have two variants:
1. Override default CSS for the dashboard.
2. Disable dashboard and create your own dashborad - for more info please check MVC demo example

Thank you.

Thanks a lot, loading a document works fine for now.


I don’t really get how to change this CSS style. In trial version, GroupDocs.Viewer is just a *.dll file which I attach to project and I think whole dashboard design is there. So should I decompile this *.dll file to make changes?

Hello,


Thank you for coming back. No, you don’t need to de-compile the dll. To change style of the dashboard we have such properties in the widget:
1. BackgroundColor
2. ToolbarBorderBottomColor
3. ToolbarButtonBorderColor
4. ToolbarButtonsBoxShadowStyle
5. ToolbarInputFieldBorderColor

If this is not enough you can override CSS in such way:
1. Open browser console - if you use FireFox or Google Chrome press F12 button
2. Select the dashboard element which you want to customize - http://prntscr.com/779il3
3. Check class name of the element and then create a CSS code which will set new properties for it.
For example:
.btn_download {
background-color: cornsilk !important;
}

This CSS code will set background color for download button as shown on the screenshot

Thank you.