Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

ImageScale causing Pdf generation to take hang

$
0
0
Setting the ImageScale property causes my Pdf not to generate, it gets stuck loading forever. I've tried setting the ImageScale to different values but it is the same result. Anybody had this/know how to fix it?

Here is the code snippet I've been having problems with:

                if (File.Exists(IMAGE_PATH + Db.getColumn<string>(dataRow, "path"))) {
                    partImage = new Image();
                    partImage.File = IMAGE_PATH +
                        Db.getColumn<string>(dataRow, "path");  //File type is png
                    partImage.FixWidth = 40;
                    partImage.ImageScale = 0.5f;
                    row.Cells.Add().Paragraphs.Add(partImage);
                }

It loads without ImageScale, but the height is extremely stretched which is why I was trying to use ImageScale.

Image in original dimensions: http://puu.sh/hl3zr/489909eb31.jpg

Image generated in Pdf originally: http://puu.sh/hl3AW/47b444f5fb.jpg

Viewing all articles
Browse latest Browse all 3131

Trending Articles