Using Gif file


We are trying to insert a gif picture of dimension 4000x4000 into the pdf. It crashes on the image height too big. What is the maximum resolution picture you fit into a pdf file. We had the impression, there will be no limit.

I noticed that in your example with image type ccit, you use a scale of 0.1F. Can we use this scale factor on the gif file and what is its effect? There does not appear to be information on image.scaling.


Dear chewban,

Thank you for considering Aspose.

If you got a “image height too big” exception, there are 2 solution: enlarge the page size or reduce the image size. You can use the Image.ImageScale to reduce the image size. For example, if you set ImageScale to 0.5, the image size will be half the real size. If you want your image be displayed with fixed size, you can use ImageInfo.FixWidth. Please refer to Image in the programmer’s guide about how to use image with fixed width.