Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Displaying PDF's and other non-HTML content in a Sencha Touch App

  1. #11
    Sencha User
    Join Date
    Jul 2012
    Posts
    13
    Vote Rating
    0
      0  

    Default not working for me on device

    code is not working for me on device as well as desktop. The demo is not working on device as well checked on Galaxy S.

    Here's my code in launch function
    Code:
    var file = 'testFile57.pdf'; 
           var viewer = Ext.create('Ext.ux.panel.PDF', {
                    fullscreen: true,
                    layout    : 'fit'
                });
                    
            Ext.Viewport.add(viewer);
            
            // Read the local file into a Uint8Array.
            var fileReader = new FileReader();
            fileReader.onload = function(evt) {
                var base64String = evt.target.result;
                var byteArray = Base64Binary.decodeArrayBuffer(base64String);  
                viewer.setData(byteArray);
            };
            fileReader.readAsDataURL(file);
    any suggestions

    thanks

  2. #12
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    454
    Answers
    19
    Vote Rating
    22
      0  

    Default What browser

    What desktop browser are you using? Chrome, Safari? We need a bit more info.....what error messages are you getting in the console (right click, inspect elements view console)?

    Code works here on safari and Chrome with the supplied link in the demo...

  3. #13
    Sencha User
    Join Date
    Jul 2012
    Posts
    13
    Vote Rating
    0
      0  

    Default

    yes the demo link works on desktop, tried on chrome, but when I integrated it with my code its displaying loader all the time and pdf doesn't load. Have you tried the example on any mobile device? I have tried it on Galaxy S didn't worked for me.

    thanks for your response

    ~M

  4. #14
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    454
    Answers
    19
    Vote Rating
    22
      0  

    Default Works on iOS

    Yes it works on iOS.....I would suggest trying this:

    http://www.sencha.com/blog/remote-javascript-debugging-on-android/

    :-)

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •