Skip to Content
0
Former Member
Oct 12, 2005 at 02:44 PM

Viewing tiff images

37 Views

I have the binary for a tiff which I stored in SAP. I wish to output this tiff into an externalWindow. If I wanted to do this for a word document the code is as follows:

WDWebResourceType resourceType = new WDWebResourceType("doc", "", false);

byte[] pdfContent = .......

IWDCachedWebResource pdfResource = WDWebResource.getWebResource(pdfContent,resourceType.DOC);

wdComponentAPI.getWindowManager().createExternalWindow(pdfResource.getAbsoluteURL(),"View Doc",true).open();

And if I want to work this out for all documents then I would use the following code...

String fileExtension = .....

WDWebResourceType resourceType = new WDWebResourceType(fileExtension, "", false);

IWDCachedWebResource pdfResource = WDWebResource.getWebResource(pdfContent, resourceType.getWebResourceTypeForFileExtension(fileExtension));

wdComponentAPI.getWindowManager().createExternalWindow(pdfResource.getAbsoluteURL(),"Report View",true).open();

The problem is WDWebResourceType does not support TIFF.

Does anyone know another way apart from creating a temp file on the file system and using the image viewer?

Thanks

Ellis