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

Free Support Forum - aspose.com

Bad rendering of Images in a word doc in aspose viewer

Please try to view the attached word doc in aspose words viewer, the images are rendered bad.

Seems that there is a bug in the RenderToScale function. Please advise

Hi there,


Thank you for your request. Our support team are looking into this request and will answer as soon as possible, please hold tight.
Thanks,

Hi Akram,


Thanks for your inquiry.

While using the latest version of Aspose.Words 14.7.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. The ID of your issue is WORDSNET-10609. Your request has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

In this case, you may just call Document.UpdateTableLayout method after loading the document into Aspose.Words DOM.

Document doc = new Document(MyDir + @“S14-00540.doc”);

doc.UpdateTableLayout();

PageInfo pageInfo = doc.GetPageInfo(0);

// Let's say we want the image at 50% zoom.

const float MyScale = 0.50f;

// Let's say we want the image at this resolution.

const float MyResolution = 200.0f;

Size pageSize = pageInfo.GetSizeInPixels(MyScale, MyResolution);

using (Bitmap img = new Bitmap(pageSize.Width, pageSize.Height))

{

img.SetResolution(MyResolution, MyResolution);

using (Graphics gr = Graphics.FromImage(img))

{

// You can apply various settings to the Graphics object.

gr.TextRenderingHint = TextRenderingHint.AntiAliasGridFit;

// Fill the page background.

gr.FillRectangle(Brushes.White, 0, 0, pageSize.Width, pageSize.Height);

// Render the page using the zoom.

doc.RenderToScale(0, gr, 0, 0, MyScale);

}

img.Save(MyDir + "Rendering.RenderToScale Out.png");

}


I hope, this helps.

Best regards,

UpdateTableLayout fixed the issue for this table but caused problems with other tables in other reports.

is there a way to call UpdateTableLayout for only one table?

when can I expect a fix for this if there is no other available fixes.

Thanks

Hi Akram,


Thanks for being patient. This issue is more complex than we initially estimated, and we regret to share with you that the implementation of this issue has been postponed till a later date. We apologize for your inconvenience.

Secondly, you do not normally need to call this method as cell and table widths are maintained automatically. You can call this method before exporting to PDF (or any other fixed-page format), only in rare cases where you confirmed that tables appear incorrectly laid out in the output document. Calling this method might help to correct the output.

Best regards,

The issues you have found earlier (filed as WORDSNET-10609) have been fixed in this .NET update and this Java update.


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