Tables in Word Document Not Displayed correctly in WEB environment

I am working on displaying WORD documents and have a desktop application and a WEB Service that share the same code to create an image. In the desktop version it looks great. In the WEB version, the bitmaps being created have the lines in the table all messed up. I have attached a file as an example. It is a memo format in which the top part and some the other sections are tables. I have tried this with the 11.0 and 11.1 versions and the results are the same. My test environment is Windows 7, Visual Studio 2010, C# code. I have a licensed copy of the total package. I am running my WEB application from VS using the built-in WEB Server. The routine that creates the images and temporarily outputs the images is shown below. Is there something I need to do different in

public Image GetPageImage(int pageNumber, HighLightText[] highlightText)
{
try
{
if (msWordDocument != null && pageNumber > 0 && pageNumber <= numberOfPages)
{
PageInfo pageInfo = msWordDocument.GetPageInfo(pageNumber-1);
const float MyScale = 1.0f;
const float MyResolution = 200.0f;
Size pageSize = pageInfo.GetSizeInPixels(MyScale, MyResolution);
Bitmap img = new Bitmap(pageSize.Width, pageSize.Height);
img.SetResolution(MyResolution, MyResolution);
using (Graphics gr = Graphics.FromImage(img))
{
gr.TextRenderingHint = TextRenderingHint.AntiAliasGridFit;
gr.FillRectangle(Brushes.White, 0, 0, pageSize.Width, pageSize.Height);
msWordDocument.RenderToScale(pageNumber-1, gr, 0, 0, MyScale);
}
string bitmapFile = String.Format(@"c:\temp\PA{0}.bmp", Guid.NewGuid().ToString("N"));
img.Save(bitmapFile, ImageFormat.Bmp);
bitmapFile = String.Format(@"c:\temp\PA{0}.png", Guid.NewGuid().ToString("N"));
img.Save(bitmapFile, ImageFormat.Png);
return img;
}
}
catch (Exception ex)
{
LoggerProviderFactory.LoggerProvider.LogException(ex);
}
return null;
}

Thank you,

Jeff Ballance

Hi Jeffrey,

Thank you for inquiry. While using latest Aspose.Words 11.1.0. I managed to reproduce this problem on my side. I have logged your issue as WORDSNET-6061 into our bug tracking system. Your request has also been linked to the appropriate issue. Once we sort it out, we will let you know. I have attached snapshot for your reference.


Moreover, if you are facing anything else please highlight it with snapshot. Please also make sure you are using similar aspose version on desktop & Web application.

The issues you have found earlier (filed as WORDSNET-6061) have been fixed in this Aspose.Words for .NET 17.5 update and this Aspose.Words for Java 17.5 update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.