This project has moved. For the latest updates, please go here.

Image perspective skewed.

Coordinator
Mar 29, 2012 at 2:59 PM

Thank you to all who have contributed to this code set.  This has really helped my project out and I wanted to contribute a few things I have found.

First, I found the images in my HTML were converting to word with skewed perspectives.  It turns out the length and width of my images were being set the same, so rectangular images were converting as squares. 

The relevant code appears to be in HTMLConverter.ProcessTags.ProcessImage:


                    if (hu.IsValid && hu.Value > 0 && wu.Type != "%")
                    {
                        preferredSize.Height = wu.ValueInPx;
                    }

should be changed to:

                    if (hu.IsValid && hu.Value > 0 && wu.Type != "%")
                    {
                        preferredSize.Height = hu.ValueInPx;
                    }

and this took care of the issue for me.