Good afternoon!
I’m working on a simple ASOC program that the end result produces a 12 or 16 page PDF document. I’ve been doing some looking around as to how to combine PDFs together thru code. I’ve used the Acrobat method where you open document 1, then document 2 and then add document 2’s pages to document 1. However, this is a little time consuming since I’m opening up to 16 pages. Then, I noticed that Smile has a command “Insert PDF” in it’s dictionary, so I’ve tried talking to Smile to do the combining. This does work about twice as fast, but Smile seems somewhat unstable, and I haven’t finished the program yet, so when Smile crashes it really causes a lot more work.
Now, my manager has an idea to use Object C. He knows more about object-oriented programming than I but we both could use some help. I’ve found this in the sample code from the developer documentation:
page = [[CalendarPage alloc] initWithImage: image month: 2];
[_calendarPDF insertPage: page atIndex: 1];
[page release];
I’m guessing that this is what I’m going to need(?):
page = [[CalendarPage alloc]];
[_calendarPDF insertPage: page atIndex: 1];
(of course with my variables instead of Calendar Page)
My question is this: is this the best way to combine PDFs? If so, how can I go about putting in straight Object C into an ASOC project? What about the information in the .h file? Would those just become properties?
Any ideas or guidance would be greatly appreciated!