Discussion Forums  >  Images, Documents, File Locations

Replies: 6    Views: 102

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

PDF - Avoid Pinch-And-Zoom

Hey everyone! I brought up this issue once before, but didn't receive a "definitive" answer, so to speak. My app has been released and it contains a lot of PDF files. On the iPad, they look like this: http://a1416.phobos.apple.com/us/r1000/097/Purple/v4/3f/40/9d/3f409d8d-c716-1abc-fd27-96a47e3cfcac/mzl.gvbamrdv.png?downloadKey=1349924705_9a01db7cc4054bb0c0d55c54a07a46af This isn't a problem as the writing is large enough for the most part that pinching and zooming is not a necessity. All the user has to do is scroll up and down. However, on the iPhone, things are a little bit smaller. Two options are to pinch-and-zoom or rotate the app into landscape view for a better read. This can be annoying as the user now has to scroll up and down as well as side to side in some cases. My question is - how can I optimize PDF viewing for both devices? An app I'd like to "imitate" in terms of viewing --> http://a3.mzstatic.com/us/r1000/100/Purple/v4/8c/50/bc/8c50bc66-a73c-63a4-7314-7031a27a4c87/5fogjnP2f0pnQEtjOAnysw-temp-upload.emtvblrb.320x480-75.jpg The fancy design is not a requirement and I'm not even sure if the documents are Word, HTML, PDF, or Powerpoint documents. Nonetheless, I'm looking for a way to convert my current PDFs into looking like something like that. I feel like this can go a long way in a future update of my app. Thanks again everyone! Nicholas
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/03/12 11:34 PM (13 years ago)
Subscribing, as I'm interested in the answer myself! Mark
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 372
Reg: Feb 15, 2012
Montreal
10,720
like
10/04/12 09:04 AM (13 years ago)
The answer seems to be eluding us! Nicholas
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/05/12 12:21 AM (13 years ago)
Hi Nicholas, I spent some time researching this today, and I've come to the conclusion that PDF files are static in their format, and there is no way to adjust the document in the way you wish for the iPhone. It looks good on the iPad because there is enough space to accommodate the formatting. But, on the iPhone, with the smaller screen, in order to present it the way it's formatted in the document, the text has to be shrunk. I haven't found any way around it. For what it's worth, I've seen the same behavior on PPT and Word docs. My suggestion would be to convert your documents to HTML. This might be somewhat problematic because of the images, but with some fine tuning, it could be addressed. Moving to HTML would provide the ability to adjust how text and images are displayed based on screen size, using CSS. There are even some viewport commands in iOS that will scale based on screen size, and allow/disallow pinch/zoom. HTML is pretty configurable, so you should have no problem getting things to display as you desire. I did a quick Google search on PDF to HTML converters, and there are a ton. Hope this helps a bit! Mark
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 372
Reg: Feb 15, 2012
Montreal
10,720
like
10/05/12 12:58 AM (13 years ago)
Hey Mark, Thanks for taking the time to do some digging around. I did some digging around of my own, but couldn't find anything fruitful. By the way, I suppose if I were to use HTML, users would have to be online each time they access the documents? I guess that's one of the benefits of having PDF files in that they are cached and available for offline use, making it available anywhere after the initial download/refresh. Thanks again for the digging, Mark, and I'll just try to look for another "offline" alternative! Nicholas
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/05/12 09:17 AM (13 years ago)
Hi Nicholas, For HTML documents, you can use the HTML Doc screen, and provide either a local HTML document, or link to one online. Your app would be perfect for a local HTML doc (one that ships with the app), and would thus be available even if there is no network connection (another ideal scenario for your app). Also, I think, generally, HTML files are smaller in size than PDF files, so they would ultimately save space and download times! You should consider this a very viable offline alternative. One of my apps, AZ Fishing Spots, has all the documents in HTML format (except a couple) and shipped with the app itself. The idea was that a user would be fishing in a remote location, and probably wouldn't have network access. Mark
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 372
Reg: Feb 15, 2012
Montreal
10,720
like
10/05/12 01:45 PM (13 years ago)
Hey Mark, Thanks for the educational lesson! I'll definitely take a look into HTML documents. I finally was able to see my app on the iPad today (presented on technology in physical education) and it's beautiful, it's just more difficult of a read on the iPhone/iPod as previously stated. I don't want to take away from the iPad reading experience, but if I could improve both with HTML documents, that will surely be the way to go. Thanks again and I'll Google around to better familiarize myself with the HTML format! Will definitely try your PDF to HTML converter suggestions. Thanks again! 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.