3

Here is my situation: I have many bitmap images (high resolution). I want to print these images using Airprint. I have found a way to print images.

NSArray array = {image1, image2, image3, image4..... image100}
UIPrintInteractionController *pic;
pic.printingItems = array;

So, I know it is possible.

BUT!! This approach uses a lot of memory. Since I want to print many images and the size of the array grows larger, I can't use this approach. So, I want to know how to print many images in Airprint.

Is there callback function like this?

Airprint says : "give me a next printing image" and then i can give an image.
jscs
  • 63,694
  • 13
  • 151
  • 195
dh0rmfpdlxm
  • 301
  • 1
  • 3
  • 16
  • Check this answer I have posted in [link][1].It may help you . [1]: http://stackoverflow.com/questions/5690931/objective-c-code-for-airprint/12052720#12052720 – Shantanu Aug 21 '12 at 10:16

1 Answers1

0

You can make your own image class, maybe? With Objective C you don't necessarily need to start with the base UIImage. You could make something that behaves like a UIImage but handles memory better.

StilesCrisis
  • 15,972
  • 4
  • 39
  • 62
  • i'm really sorry. i don't understand exactly – dh0rmfpdlxm Dec 13 '11 at 05:35
  • I'm saying, make your own class that implements the same functionality as UIImage, with the same method names. (e.g. it implements -imageOrientation and -size and -scale) Make it use memory more efficiently. Then fill your NSArray with objects of your own class instead of UIImages. – StilesCrisis Dec 13 '11 at 05:40
  • thanks, but if i have many images that i print , i think this approach(your suggestion) still needs a lot of memory. is there other approach?? :'-( – dh0rmfpdlxm Dec 14 '11 at 06:56
  • Obviously your class would need to manage memory intelligently and not actually load all the images up front. – StilesCrisis Dec 14 '11 at 08:06