1

Does anyone have an idea of how I could display a pdf on glass? I've tried converting the pdf to other formats (xml) and it just isn't accurate enough to get all the information in the correct order.

My only idea so far is have each page of the turned into an image and then just display that image, but I am not really a fan of that solution.

Any suggestion that could be provided would be great. Thank you

kylepotts
  • 81
  • 1
  • 1
  • 8
  • you might find [this link](http://stackoverflow.com/questions/2456344/display-pdf-within-app-on-android) helpful. can't verify that works, but Glass is Android so you never know. there might be some good tips there. – Nerdtron Jun 04 '14 at 19:03

1 Answers1

0

I think you may be trying to do something that Glass is poorly suited for.

If you're out to create a graphically-perfect representation of a PDF file, your user will either need to strain to read the text, or will be doing a lot of working scrolling around an image. While it may make sense in some cases, in general, users don't interact with Glass this way.

You may wish to focus on a PDF-to-text approach that allows the user to read the text (and possibly see the overall image to get an idea of the PDF) and to listen to a text-to-speech conversion of the page.

If you're dead-set on this, you may wish to see if you can leverage the built-in browser to see if you can either distribute or render the PDF via this delivery method.

Prisoner
  • 49,922
  • 7
  • 53
  • 105
  • I don't have much of a choice on the PDF portion. I need to get information from the pdf to glass. The pdf to text approach is the best option, but I can't seem to find a good library that does the conversion with any acceptable accuracy. The most important thing is that the information is displayed in the correct order that it is in the pdf. The current method I have for converting combines some columns and rows. – kylepotts Jun 02 '14 at 16:28
  • it all depends on the specific content and formatting in the PDF; PDF itself isn't necessarily poorly suited for display on Glass; if formatted properly it could work. the question here I think is, aside from whether your specific PDF is formatted well for Glass, how do you display an arbitrary PDF on Glass. – Nerdtron Jun 04 '14 at 19:04