A couple of image issues


I have a few issues while working with images in Aspose.

1. How come adding a 16KB gif adds 46KB to my final PDF document? I have a 52KB pdf file, but if I take out the image reference (there’s only one) the size drops all the way down to 6KB. This is all I’m doing:

2. Is there a way I can call this image to show up twice (or more) in the document without loading in a separate copy of the image? I hope that makes sense… for example, if I just call the image twice like this:

Then the size of my document jumps from 52KB to 98KB, which might seem pretty minor to most, but it’s a big problem for our bank which will have to generate thousands of PDFs for customers.

So I’m wondering if it’s possible to somehow only load the image file once and use its reference multiple times within the PDF? Please, keep in mind that I’m using just XML which will be bound to the Aspose object, no VB code.

3. And lastly, I’m not sure if it’s just my image quality problem or an option within the Aspose XML, but I’ll ask it anyway… My image is black and white - black text/logo with a white background. It looks fine when I open the PDF on my screen, but when I print the PDF it seems that the background is not completely white. There’s tiny black dots all over, as if it’s not a plain white background, but a bit gray. Any ideas on what I can do about that? I’ve tried GIFs and JPEGs.

Thanks in advance for the help.


Dear Kostik,

Thanks for your consideration.

1) I will release a hot fix soon, which will fix some bugs in GIF and PNG image. Transparent background image will be supported. This can solve your problem 1 and 3.

2) As for your question 2, I think your advice is reasonable. I will consider how to reuse image in pdf document.