How to show Docs on viewer when htmlmode: true

I’m facing issue when i doing changes in Configuration.yml file htmlMode: false to htmlMode: true , my document is not view properly on viewer page. document is showing in html form not in proper form.
its like this …
image.png (8.3 KB)
And my code for that …

private HtmlViewOptions CreateHtmlViewOptions(int passedPageNumber = -1, int newAngle = 0)
        {
            HtmlViewOptions htmlViewOptions = HtmlViewOptions.ForExternalResources(
                pageNumber =>
                {
                    string fileName = $"p{pageNumber}.html";
                    string cacheFilePath = this.cache.GetCacheFilePath(fileName);

                    return File.Create(cacheFilePath);
                },
                (pageNumber, resource) =>
                {
                    string fileName = $"p{pageNumber}_{resource.FileName}";
                    string cacheFilePath = this.cache.GetCacheFilePath(fileName);

                    return File.Create(cacheFilePath);
                },
                (pageNumber, resource) =>
                {
                    var urlPrefix = "/viewer/resources/" + Path.GetFileName(this.filePath).Replace(".", "_");
                    return $"{urlPrefix}/p{ pageNumber}_{ resource.FileName}";
                });

            htmlViewOptions.SpreadsheetOptions.TextOverflowMode = TextOverflowMode.HideText;
            htmlViewOptions.SpreadsheetOptions.SkipEmptyColumns = true;
            htmlViewOptions.SpreadsheetOptions.SkipEmptyRows = true;
            SetWatermarkOptions(htmlViewOptions);

            if (passedPageNumber >= 0 && newAngle != 0)
            {
                Rotation rotationAngle = GetRotationByAngle(newAngle);
                htmlViewOptions.RotatePage(passedPageNumber, rotationAngle);
            }

            return htmlViewOptions;
        }


Please have a look and please help me on this. how can i resolve these issue.

@Niteen_Jadhav

Please confirm that you’re running MVC demo app. Or you can share your application so we could take a look. Please also attach the sample file you’re using.

I used your MVC demo application but its giving same issue its showing html form. what can i do. Give me another way.

@Niteen_Jadhav

Have you got a chance to try this MVC Demo that has HTML mode enabled by default? In case you’re still want to use Archived MVC Demo we can take a look at it.

where we can change in my project to get resolve this issue ? because i have match this both the projects codes are same only i have changed in configuration.yml file htmlmode false to true in my #docprodms project .
image.png (9.0 KB) refer this snipt.

@Niteen_Jadhav

Let me check the demo.

@Niteen_Jadhav

I’m sorry for the delayed response. I have prepared the sample application that shows how to run MVC demo with htmlmode set to true. Please check this sample app.