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.