Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone - Printing multiple images on one sheet

I have an array of jpgs (7) that I would like to print. All the images are the same size, 900x1382, and I would like to print them two to a page by rotating them 90 degrees and printing them top/bottom on a letter sized piece of paper.

It sounds like I need to create a printFormatter but that's where I am getting stuck. I have read through Apple's Drawing and Printing Guide probably 10 times and I cannot figure how to do what I want to do.

Can someone help me out or at least point me in the direction of a good tutorial?

like image 589
Brodie Avatar asked Jan 21 '11 13:01

Brodie


1 Answers

    - (void)drawPageAtIndex:(NSInteger)pageIndex inRect:(CGRect)printableRect
    { 
        // You can draw images in the specified rect. 

    }

Try to subclass UIPageRenderer, then override the above function. You can draw the images in specified rect. I think you have to check the Apple's PrintPhoto sample code, and custom drawing from your old guide. Check it and add comments about this. thanks :)

like image 58
Jay Avatar answered Oct 13 '22 16:10

Jay