Linq image -fitSize is not working as expected

Hi

When I'm executing a template with such a tag

<<image [image_expression] -fitSize>>

it produces the image which fits all the page size instead of image size.

Why is that?

Is it some with my template?

If so, could you please provide a valid template or send me a link to any working example?

Regards, Sergey

Hi Sergey,

Thanks for your inquiry. The -fitSize changes the size of the textbox according to the size of the image. If the image’s size is greater than page’s size, the shape will render outside the page.

The input image “test2.jpg” has 0kb file size. Could you please attach this image again here for testing? We will investigate the issue on our side and provide you more information.

Here is my test2

Hi Sergey,

Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-14267. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Sergey,

Thanks for your patience. It is to inform you that our product team has completed the work on issue (WORDSNET-14267) and has come to a conclusion that this issue is not a bug in Aspose.Words. So, we have closed this issue as 'Not a Bug'.

The input image have 2 DPI resolution. That is why, the size of the image in inches is 154.5 x 108. LINQ Reporting Engine uses the size of the image in inches (not pixels) while fitting the size of the corresponding text box so the image looks in MS Word bigger than in an image viewer (that does not consider an image resolution). This is by design.

In your case, we suggest you please change the resolution of the image to get the desired output. If you cannot change the resolution of image, please let us know, we will add a new option (feature) in Aspose.Words to fit your requirements.

Hi


I’m fine with your answer and can change DPI.

Which DPI should I use to have my image container 1:1 to the image size?

Regards,
Sergey
Hi Sergey,

Thanks for your inquiry. Please change the DPI to standard 96 DPI.