cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying TIFF images in WD4A window

Former Member
0 Kudos

Hi,

I'm currently working on a browser like application using WD4A. The idea is to browse through a bunch of archived documents with a tree on the left hand side and a component window on the right hand side where the image is displayed. The images are retrieved via HTTP so they can be either directly addressed with an URL or I can get the content at runtime into the application server.

In order to display the images I used the IFRAME UI element but 1. it is refreshed in each Request / Reponse Cycle and 2. it is depreceated.

Now, from a few other forum discussions I know how to solve the problem for : PDF, Office documents, JPG, PNG, GIF and TXT using the appropriate UI elements.

But, I still don't see a way to display things like TIFF or AVI or even more specific document classes in the same browser window as a sub component.

Has anybody got an idea how to solve the problem?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Two answers:

1 Simple and effective:

In the wd app use an image or iview element, and set the source property to a URL pointing to the TIFF image. At runtime the browser will isuse a HTTP request to retrieve the TIFF file. In order to display the image within the browser page you will need a browser plugin. You can use the one from http://www.alternatiff.com it is free, the only requisite is to register once there is no charge and works well, it supports paging, printing, saving, zooming, panning, rotating, etc.

In general, web browsers have builtin handlers for the most popular mime types, and the ability to use plugins for extending their basic capabilities. Other common mime types that require a plugin are PDF and FLASH.

The Apple Quicktime browser plugin is also able to display a TIFF within a web browser but it does not have any of the features I mentioned above in particular if the TIFF has multiple pages it will only show the first one. So this is not a good option unless your tiff images are single page.

---

2. More advanced and difficult

2. Use IGS to convert from TIFF to JPEGS, and provide a UI that is able to dynamically show the JPEG images one by one. Keep in mind that in WD the Image or Iview element has a source property that expects the image URL, and not the binary content of the image so you will need to store the converted images somewhere using a naming convention like image01.jpg, image02.jpg ... imageN.jpg for a TIFF with N pages. Then in the source property you will specify the servlet url passing the page number as a parameter. As a result the corresponding page will be shown. The user will need a way to navigate through the pages, this can be done with two buttons, previous and next or with a dropdown.

My experience with IGS was the the converted images had some loss of image quality and where in many cases not very readable.

The amount of programming in the second approach is considerable larger but the user does not need to install a plug in.

Best regards... Lucio Menzel

Former Member
0 Kudos

Errata: In my posting I mentioned IView but I meant IFrame instead.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Thomas,

just noticed your reply. This answers my question and I can be sure that currently there is no way of displaying TIFFs directly.

Thank you very much

Best regards

TOrsten

Former Member
0 Kudos

Hi Lucio,

thank you very muc for your answer. The AlternaTIFF plugin is fine and it works well. But there is still the problem:

1. The UI Element IMAGE does not work with a URL as source.

2. The UI Element IFRAME works (the ALTERNATiff is processed) but it is deprecated and is refreshed with every request/response cycle.

You mentioned a UI element IVIEW which does not exist in my system.

So, what is the UI Element where I have to process the URL in order to display the document?

Best regards

Torsten

Former Member
0 Kudos

Hi Thomas,

sorry to answer so late but I had to think about for a while. I understand what you mean. Decoupling would mean there is another browser application making the display e.g. as a BSP. That would work but would indeed only solve the problem within a portal context or by starting a separate browser window.

But, my application (Web based interface on Record/Case Managemet) is designed to be a full web dynpro application since it should be runnable in a non-portal context. So, what I've successfully done is to dynamically call any web dynpro component respecting a common interface.

Summarizing that up to now it is not possible to integrate e.g. an active X component of the explorer via a UI element.

If there was a UI element being able to do that it would solve the problem. If you look at ITS or SAPGUI it is done that way.

Best regards

Torsten

thomas_szcs
Active Contributor
0 Kudos

Hi Torsten,

Thank you for providing the background information. Unfortunately, reusing any kind of ActiveX is currently not possible since it would pose a possible security thread to an application. So the iframe solution or the externalUrlWindow solution are probably the only ways to achieve what you want with Web Dynpro. Nonetheless, SAP offers other technologies as well. BSP, for example, might be more suited to implement your special scenario.

Best regards,

Thomas

Former Member
0 Kudos

Hi Thomas,<br><br>

Does the WD4A development team plan to release new UI elements ?

<br><br>

A useful one could be a multiformat Image UI element which would convert on the fly any input image (in lets say TIFF/BMP) to a web format image (like PNG/JPEG/GIF).<br> I believe it would be useful in many cases and could then avoid the use of thirt-party client-side plugins or ActiveX stuff (which are not very compliant to the W3C recommandations and their definitions of web standards).

<br>

Sincerely,

<br><br>

Olivier MATT

thomas_szcs
Active Contributor
0 Kudos

Hello Olivier,

Actually, such a converter, which is independent of any user interface would be a great community project. With such a converter implemented in ABAP anyone could use the existing Image ui element to display a tiff or bmp image. An alternate solution might be to call a web service that performs this conversion. I am pretty sure something like this already exists somewhere on the web.

Best regards,

Thomas

Former Member
0 Kudos

Hi Thomas,

<br><br>

An imaging library in ABAP would be great. Otherwise for WD4Java, the JAI API (http://java.sun.com/products/java-media/jai/iio.html) could be used to create such a UI Element. :)<br><br>

Sincerely,<br><br>

Olivier MATT

thomas_szcs
Active Contributor
0 Kudos

Hi Torsten,

You need to decouple the iframe and the WDA application, which means that the iframe should not be part of the WDA application. A possible way to achieve this is to make a small BSP application containing a frameset with two frames. One shows the WD application, whereas the other displays the tiff. In case you would like to change dynamically upon i.e. clicking somewhere within the WD application, things will start to get messy. In that case, my suggestion is to user the enterprise portal and to display the tiff using a small BSP application and have the WD and BSP application talked to each other using portal eventing.

Best regards,

Thomas

Former Member
0 Kudos

Hi Torsten,<br><br>

The "Image" UI element can take a URL source. I checked the HTML coding of the generated page and it seems that the webdynpro HTML renderer created an < img src="URL" > set of tags for this "Image" UI Element. <br> <br>

TIFF files would then be probably viewables if the client has a registered plugin (like quicktime) on the browser. I am not 100% sure that I works exactly like this but it could be checked. <br> <br>

Thomas Szuecs: <br>

<blockquote>1. is there a way to start a new browser window and specify the URL to be opened with WDP4A (and probably hiding the taskbar and other decoration bars on the window?). <br>2. Is there a hack to allow Javascript programming directly within ABAP for Webdynpro? :)</blockquote>

thomas_szcs
Active Contributor
0 Kudos

Hi Oliver,

Let me quickly answer your questions:

1. You can start a new browser window by calling CREATE_EXTERNAL_URL_WINDOW at the IF_WD_WINDOW_MANAGER interface (just as you would call up a popup window). This method has parameters that allow you to define how the new browser window should look like.

2. There's no known hack to allow JavaScript...

Best regards,

Thomas