Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: A PDF Viewer Panel - No Browser Plugin required, pure JavaScript

  1. #1
    Sencha User SunboX's Avatar
    Join Date
    Mar 2010
    Posts
    238
    Vote Rating
    28
      9  

    Default A PDF Viewer Panel - No Browser Plugin required, pure JavaScript

    Ext.ux.panel.PDF

    A PDF Viewer Panel for the ExtJS 4.1 Framework - No Browser Plugin required, pure JavaScript.
    PDF Rendering is done using the great Mozilla PDF.js Library (https://github.com/mozilla/pdf.js).


    Usage

    Code:
    Ext.create('Ext.ux.panel.PDF', {
        title    : 'PDF Panel',
        width    : 489,
        height   : 633,
        pageScale: 0.75,                                           // Initial scaling of the PDF. 1 = 100%
        src      : 'http://cdn.mozilla.net/pdfjs/tracemonkey.pdf', // URL to the PDF - Same Domain or Server with CORS Support
        renderTo : Ext.getBody()
    });

    Demo

    For an demo, please visit http://SunboX.github.com/ext_ux_pdf_panel/demo/


    Github Project

    https://github.com/SunboX/ext_ux_pdf_panel

  2. #2
    Ext JS Premium Member burnnat's Avatar
    Join Date
    Jun 2011
    Posts
    418
    Vote Rating
    64
      0  

    Default

    Great job, very cool! Maybe you'd want to consider adding it to the Sencha Market...

  3. #3
    Sencha User notverycool's Avatar
    Join Date
    Aug 2012
    Posts
    4
    Vote Rating
    0
      0  

    Default

    well done!

  4. #4
    Ext JS Premium Member
    Join Date
    Jan 2011
    Posts
    27
    Vote Rating
    1
      0  

    Default

    Excellent!

  5. #5
    Sencha User talha06's Avatar
    Join Date
    Jul 2009
    Location
    Turkey
    Posts
    327
    Vote Rating
    1
      0  

    Default

    amazing extension, working like a charm with server-side generated pdf files too. congratz SunboX!!
    "People will never forget how you made them feel."
    linkedin.com/in/talhakabakus

  6. #6
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,388
    Vote Rating
    499
      0  

    Default

    Good job. Thank you for sharing.

    Scott.

  7. #7
    Sencha User conorarmstrong's Avatar
    Join Date
    Mar 2008
    Location
    Northern Ireland
    Posts
    224
    Vote Rating
    2
      1  

    Default

    good work. shame it doesn't work in IE. That's not your fault though - neither does pdf.js itself.
    ------------------------------------------
    Conor Armstrong
    tw: @evathedog
    web: rockstown.com

    Ext.ux.form.AutoCombo
    Ext.ux.SimpleIFrame
    Ext.ux.form.ToolFieldSet

    Knowledge is realising that the street is one-way, wisdom is looking both directions anyway.

  8. #8
    Sencha User SunboX's Avatar
    Join Date
    Mar 2010
    Posts
    238
    Vote Rating
    28
      3  

    Default

    Quote Originally Posted by conorarmstrong View Post
    good work. shame it doesn't work in IE. That's not your fault though - neither does pdf.js itself.
    Thx all!

    Maybe you can get it working in older IE by using flashcanvas or ExplorerCanvas. But I didnt have tested them.

    Another thing I thought about is using an iframe as fallback if no canvas is supported. Lets see if I get some time to check this. Or if someone has the time, fork it and make it more awesome! ;o)

    greetings Sunny

  9. #9
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    5
    Vote Rating
    1
      1  

    Default

    Looks nice Sunny.
    Can this also be ported to Sencha Touch 2? Or is there another way to get it working on Sencha Touch 2

    Kind regards

  10. #10
    Sencha User SunboX's Avatar
    Join Date
    Mar 2010
    Posts
    238
    Vote Rating
    28
      2  

    Default

    Quote Originally Posted by xcomm View Post
    Looks nice Sunny.
    Can this also be ported to Sencha Touch 2? Or is there another way to get it working on Sencha Touch 2

    Kind regards
    Should be possible. I will take a look at this. Maybe next weekend.
    Water is coffee with javascript turned off.

Page 1 of 3 123 LastLast

Posting Permissions

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