We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

How to view doc file in viewer using Groupdocs.viewer

hi

i am new to groupdocs.viewer in web form, i use the code to view the doc file in web form the code i taken from gituhub i config the groupdocs.viewer dll in my project.

i use the code like this but not view in the viewer it download in local path.

string documentPath = @"C:\Users\admin\Desktop\170 fils\change in sql sp copy.docx";
        using (Viewer viewer = new Viewer(documentPath))
        {
            // Set view options 
            //ViewOptions viewOptions = new PngViewOptions();
            string filePathFormat = @"C:\Users\admin\Desktop\170 fils\output\1.png";
            //HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources(filePathFormat);
            //viewer.View(options);

            ViewOptions viewOptions = new PngViewOptions(filePathFormat);
            // Convert file to PNG and check the output in the current directory 
            viewer.View(viewOptions);

           
        }

i want the sample for view the file in viewer.

@psd.senthilnathan

Please take a look at this Web Forms Minimal App or our Web Forms Demo. Looking forward for your feedback.

hi sir,

thanks for reply i work with the project that u send the viewer open

we need to combine all the function like (annotation, search, editor, parser etc…) in ur samples link use different.

@psd.senthilnathan

You’re welcome! Let us know if you have any questions.

we need to combine all the function like (annotation, search, editor, parser etc…) in ur samples link use different.

hi sir

    I convert the code WebApiConfig.cs  to WebApiConfig.vb we are using vb.net

Public Shared Sub Register(ByVal config As HttpConfiguration)
config.MapHttpAttributeRoutes()
End Sub

like this come in global.asax i got this error

image.png (11.7 KB)

pls give some solution for vb code

@psd.senthilnathan

I would recommend starting with a template, I’ve created one for you in Visual Studio web-forms-vb-from-template.zip.

hi

thanks sir i check and update

@psd.senthilnathan

You’re welcome!