Bad PDF color rendering on iPad

Just a quick note today (since I haven’t written anything in months) about PDFs on the iPad. As part of my job, I get to work with some really awesome designers. In the last two apps we have occasionally noticed some issues with how colors appear when viewing a PDF on the iPad. This has only been an issue with a handful of PDF’s but if you have a product brochure that looks great in print we want to it look amazing on the screen as well.

In our particular case, we had a lot of purple tones that were appearing blue and pink tones that looked purple. The saturation also appeared more intense and while the images and text were crisp, the colors just looked slightly (or on some more severe occasions) completely off. If you have experienced this, apparently the iPad does not do a great job of rendering PDF’s designed and saved as CMYK.

Various attempts to fix it

I discovered several differing opinions on both the cause and resolution as I scoured the net. One suggestion was to open the pdf in Preview and re-export with the Quartz option to reduce file size. I tried that and it did not work. I also attempted creating custom filters in Apple’s ColorSync Utility. I still am guessing there is a way to make that work but my attempts failed.

Something that worked for me

Finally, I found a posting on a discussion board suggesting converting it to sRGB with Adobe Acrobat Pro. That fixed the problem! For my version of Acrobat, the option was found under View->Tools->Print Production. This brought up a side menu. The option that worked was under Preflight->Convert to sRGB. Double click that and save the corrected pdf.

As always, there are a lot of great ideas strung around discussion boards but sometimes you have to dig a bit to find something that works. Hope this helps someone get to a solution faster.

Google Analytics – for web and mobile traffic

For some odd reason, I have always enjoyed tracking certain types of data. I was very happy when I hooked up the Jetpack suite of plugins for WordPress this past weekend and was then able to see basic site traffic information. Tonight (guess I should say this morning) I have also incorporated a second level of tracking – Google Analytics.

Setting up Google Analytics to track your own app or web page is pretty simple. It will tie your analytics access to your Google account – a simple gmail account will be just fine.

Go to http://www.google.com/analytics/ and click the link saying “New to Analytics -sign up now.” If you already have a google account just type in your credentials on the next page.  You will need to put a note in your app that clearly states that users are being tracked.

Like many google pages, there is a gear on the top right.
Click the gear to go to the account administration screen
Click the plus sign to add a new account
Now you will enter the name and URL of the site or app you want to track.
After you have filled out this short form, Google will generate a unique identifier for you to use from your mobile app or web page. This ID in their terms is called a UA code.

Once this is set up you are ready to use their UA code from your app or from your web page.

Since this post is meant to be only a high level introduction, I will keep this short. Excellent documentation is available on the Google Analytics site.

Tracking basic web pages
If you want to track a web page, just cut and paste the javascript they give you when they generate the code.

Tracking WordPress pages
If you want to track your WordPress page, I recommend installing a plugin such as the Google Analytics for WordPress plugin. It will allow you to type this UA Code in and then do page level tracking.

Tracking iOS page views
Grab the latest Analytics SDK directly from Google – http://code.google.com/apis/analytics/docs/mobile/download.html#Google_Analytics_SDK_for_iOS
Extract it and copy the GANTracker.h and libGoogleAnayltics.a into your existing iOS project with Xcode.

Open up your application delegate and in didFinishLaunching add the following snippet

[[GANTracker sharedTracker] startTrackerWithAccountID:yourTrackerId                          dispatchPeriod:10
                      delegate:nil];
 Now you can do page tracking with a simple line like this: (note I would put this in viewWillAppear in a view controller)
NSError *error;
if (![[GANTracker sharedTracker] trackPageview:yourPageName withError:&error]) {
        NSLog(@"Analytics logging failed %@", error);
}

Conclusion

There is a lot more you can do besides page tracking, but this is enough to hopefully perk your interest and set something up. As you can see, it is really minimal effort to get something up and running.   They have an API for Android and other platforms as well.  As I said before, Google’s documentation is great and for free analytics, it is really excellent!    The benefit of data like this is to aid you in creating better experiences for your users to see what features they like and what gets ignored.  Your biggest challenge will be in determining what and how much to track to gain the best insight into their needs.