Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 9    Views: 53

GraciousWolf_PE
Aspiring developer
Profile
Posts: 372
Reg: Feb 15, 2012
Montreal
10,720
09/06/12 08:07 PM (13 years ago)

PDF Print Option & Viewer Optimization

Hey everyone, So my application has been rejected for a 3rd time. Spoke to a member on the Apple Review Team who told me he'd like for my PDF documents to allow for more than simple viewing. He suggested adding a "Print" option; however, I am not sure how to go about this. Any suggestions would be greatly appreciated! Also, not as big of an issue, but is there a way to "Optimize" the viewing of PDF documents? It seems to be fine on the iPad; however, on the iPhone/iPod platform, the pinch-and-zoom approach is used and I'd like for that NOT to be the case. Once again, any suggestions for a "I hate code!" user would be greatly appreciated! Thank you to everyone in advance, Nicholas
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/06/12 08:14 PM (13 years ago)
Howdy! Couple forum entries might help you out: http://www.buzztouch.com/forum/thread.php?tid=06E249A0AB536579449DA39 and http://www.buzztouch.com/forum/thread.php?tid=FEC05AEB30B34A0A2EA2774 That addresses the print issue. Not sure how you could optimize a PDF document on the iPhone. As a user, given the real estate of the device, I don't see any way around showing a full page and allowing me to pinch/zoom. Mark
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 372
Reg: Feb 15, 2012
Montreal
10,720
like
09/06/12 08:26 PM (13 years ago)
Thanks @GoNorthWest for the quick reply! I suppose it's always wise to search the forum before posting. ;) I will be looking into this during the weekend. Thanks again for the technical support! Nicholas
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
09/06/12 10:24 PM (13 years ago)
Don't give up Nicholas, you've got this. When it gets approved, drop us a link :-) Cheers, David buzztouchmods.com
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 372
Reg: Feb 15, 2012
Montreal
10,720
like
11/09/12 07:13 PM (13 years ago)
Sorry for re-opening what should be a "closed" thread, but it's been brought to my attention from a user that when trying to print a document, it always prints the same one! I've had to reject my update + reject my new app to be (fingers crossed) in the App Store so that I could resolve this. I followed this guide to the tee: http://jc-evans.com/wp-content/uploads/2012/07/Add-a-Print-Button-to-a-BT-App.pdf The print function works, but it's worth noting that it always prints the 1st document alphabetically found in Xcode. I have a feeling this may be the culprit in some way... Any help? Nicholas
 
nyandrews
Aspiring developer
Profile
Posts: 7
Reg: Sep 19, 2012
Manlius
5,270
like
12/14/12 09:45 AM (13 years ago)
Any luck with only printing the first page? I too am having the same problem. I noticed in the instructions it says to apply the code to each PDF individually, but I am not understanding what and where to apply. Thank you all!
 
nyandrews
Aspiring developer
Profile
Posts: 7
Reg: Sep 19, 2012
Manlius
5,270
like
12/14/12 09:46 AM (13 years ago)
Any luck with only printing the first page? I too am having the same problem. I noticed in the instructions it says to apply the code to each PDF individually, but I am not understanding what and where to apply. Thank you all!
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 372
Reg: Feb 15, 2012
Montreal
10,720
like
12/14/12 10:52 AM (13 years ago)
This is exactly what I did to solve this - should work for you and anyone else in need of printing documents (in this case, PDF files!). What I did: Took: NSArray *components = [shareTitle componentsSeparatedByString:@"."]; Changed it to: NSArray *components = [self.localFileName componentsSeparatedByString:@"."]; Also removed: NSString *shareTitle; @property (nonatomic, retain) NSString *shareTitle; AND @synthesize shareTitle; as they were no longer needed! Should do the trick! Nicholas
 
nyandrews
Aspiring developer
Profile
Posts: 7
Reg: Sep 19, 2012
Manlius
5,270
like
12/14/12 11:13 AM (13 years ago)
GraciousWolf_PE Wow thank you greatly! That did do the trick. How did you find that? This programming (hacking) is proving to be harder than I expected. Your help is going to allow me to submit my app tonight. Thanks again! nyandrews
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 372
Reg: Feb 15, 2012
Montreal
10,720
like
12/14/12 11:49 AM (13 years ago)
My pleasure, nyandrews! I wish I could take credit for figuring out the programming myself, but I tend to shy away from code that's not explicitly written step-by-step! I had been trying to solve this issue for the longest time and finally found a pro willing to take a look at the "How To Print" guide as well as the code for my app. He actually never needed to examine the latter. Crazy how changing one line of code made a world of a difference! Good luck with your app submission! Nicholas
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.