[CLOSED] Best practice for image viewer

  1. #1

    [CLOSED] Best practice for image viewer

    Good morning.

    I was looking in EXT.NET examples to find the best practice for image viewer, which will display stored image/pdf documents in a server path and allow the following operations:

    • view various document & image formats, like PDF, TIFF, BMP, JPEG, GIF and PNG
    • Offer several image displaying options, like fit width, actual size.
    • zoom in & zoom out when viewing
    • save image or PDF document into local.
    • ..etc

    Which component is performing this for me?!
    Last edited by Daniil; Jan 27, 2016 at 9:43 AM. Reason: [CLOSED]
  2. #2

    I believe you should not have much problems with image viewing, as long as the browser supports them.

    But for files like PDF, usually viewing them you'll need either a JavaScript rendering library (to effectively render the pages as SVG or other picture formats), or open it inside an iframe. This second approach may fail in several situations, as it would require the user to have proper PDF handler on their browser and, depending on the extension (or lack of it), it will probably be asked to open in the PDF application, outside the browser.

    Well, long story even longer, here's a thread were some aspects of PDF were discussed, and it might help you: PDF is not shown in a Panel with Firefox.

    As for tiff and other non-standard image formats, you might need a conversion library to allow them to be displayed on screen as well, and incorporate this result in a frame. Here's a discussion in stack overflow about this: Display TIFF image in all web browser

    That said, there's no such component in Ext.NET. You can add the result of any of the libraries inside a panel, a tabPanel or other components, but a separate, 3rd-party renderer for the contents will be necessary.

    In case of ordinary .png, .gif, .bmp, .jpg, .jpeg and .svg images, we have the ext:Image component. This will probably be the component you will be using in conjunction to a rendering library to encapsulate the resulting image (in case of tiff, for example). A more sophisticated option will need to take place for PDF viewing. For example, a panel, with an iframe loader for a PDF.

    I hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Thanks for your kind reply.

    I used the ext:Image for now, but I want to perform zoom IN/OUT operation on the image.

    What is the best way to accomplish that?!

  4. #4

    I am afraid we don't have such functionality in ext:Image component as we do have in the graphs componets like the Line Chart Plot with pan/zoom example.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Document Viewer
    By GKG4 in forum Feature Requests
    Replies: 3
    Last Post: Feb 11, 2015, 4:38 AM
  2. Thumbnail Viewer
    By walle in forum 1.x Help
    Replies: 13
    Last Post: Dec 09, 2010, 8:15 AM
  3. Custom Report Viewer
    By harinarayanan123 in forum 1.x Help
    Replies: 0
    Last Post: Aug 19, 2010, 10:47 AM
  4. [CLOSED] Image Viewer
    By cobiscorp in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 28, 2010, 10:28 AM
  5. [CLOSED] [1.0] PDF Viewer in Tab
    By rcaunt in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: May 17, 2010, 10:49 AM

Posting Permissions