26
Jun
unnamed

Ever wondered why you have to open up a PDF in Android on Chrome or using a 3rd-party viewer? Well, it's because up until now Android hasn't had a native PDF rendering tool in place. As of Android "L," it does. If you're on Android 4.4 or below, try opening a PDF in the Drive app - you'll be sent to whatever your native PDF viewing tool happens to be. Now, if you're on the "L" preview release, do the same thing in Drive (make sure no PDF viewers are installed, that might break this behavior), and you'll see the PDF displays natively in the app. Edit: Turns out this is QuickOffice, not a native viewer. However, the new renderer is still there and should still do what I described, it's just not implemented yet.

Screenshot_2014-06-26-13-19-11

In terms of sheer convenience, this is pretty big. No one likes having to use a 3rd-party PDF viewer just to look at a file, and this almost definitely means you can expect native PDF viewing is on the way for any Google app that might require it. Gmail, for example. Here's the blurb from the Android "L" developer documentation on this new API class.

New api class: PdfRenderer

This class enables rendering a PDF document. This class is not thread safe.

If you want to render a PDF, you create a renderer and for every page you want to render, you open the page, render it, and close the page. After you are done with rendering, you close the renderer. After the renderer is closed it should not be used anymore. Note that the pages are rendered one by one, i.e. you can have only a single page opened at any given time.

Neat stuff.

David Ruddock
David's phone is whatever is currently sitting on his desk. He is an avid writer, and enjoys playing devil's advocate in editorials, and reviewing the latest phones and gadgets. He also doesn't usually write such boring sentences.

  • http://jordanhotmann.com/ Jordan Hotmann

    This is good. For some reason lots of restaurants like to keep their menus in pdf format and I don't want to install a pdf reader just for that. (For times when they aren't available in Google Now, of course)

  • Matt

    @rdr0b11:disqus I noticed Quickoffice is included on "L" and when I open a PDF in Quickoffice on 4.4.4 the interface looks identical to the screenshot above. Is it is just opening it in Quickoffice as default?

    • http://www.androidpolice.com/ David Ruddock

      You're right, that IS quickoffice. Our bad. But the PDF renderer is still in there, presumably it's not just being used yet.

      • Ibrahim Awwal

        Well, if it's just a new API there might not necessarily be a built in app that uses it yet. But at the same time it's totally possible that quick office is using that API on L (unlikely, IMO, but possible). I guess you'd have to disassemble the APK to know for sure.

        • Alex

          Or maybe the PDFRenderer API was extracted from Quickoffice and moved to core Android, and Quickoffice is using it... who knows? ;-)

  • Simon Belmont

    This is really nice. The only time I use Adobe Reader on my phone or tablet is the rare occasion that I need to digitally sign something.

    I wonder if this viewer will let me do that. That would be awesome.

  • Arcest

    What about in-document search, highlighting, text wrap, reading mode, save a copy, share, and such?

    • Paul_Werner

      Editing and adding signatures would be nice too though I'm sure they'd have to jump through more legal hoops to do that

  • Gurst

    Does it mean pdf are now perfectly smooth (it's laggy as hell in adobe reader) ? Or juste better integration ?

    • Patrick Smithopolis

      It runs worse than adobe reader.

      • someone755

        How is that even possible?

        • Derik Taylor

          Magic.

  • Salil Chandra

    Do you still have to download the PDF to view it in Chrome or can you just open it directly in Chrome without downloading it?

    • Patrick Smithopolis

      You still have to download the pdf.

    • Rafael Luik

      This depends on how/if Google Chrome devs are going to use the new API, it's too early to tell.

  • Tyler

    I use ez PDF to draw on the screen I have a feeling this is still going to be very limited.