SharePoint au Quotidien avec EROL

 

Retour page Accueil
Remonter

 

 

 

 

 

 

 

 


Présentation du SDK

Le SDK SharePoint™ 2003

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/SPSDKWelcome.asp

Microsoft SharePoint Products and Technologies 2003 Software Development Kit

Programming with the Microsoft.HtmlTrans.Interface Namespace

Using the Microsoft.HtmlTrans.Interface Namespace

A user may request a document from a document library without having an application capable of displaying the requested document installed on his or her client computer. Windows SharePoint Services provides the Microsoft.HtmlTrans namespace as an infrastructure on which to build custom converter applications, which delivers an HTML version of the requested document to the user in these circumstances in place of the unrecognized binary file format.

Caution  The HTML Viewer feature must be enabled in SharePoint Central Administration in order to use this functionality.

The Microsoft.HtmlTrans namespace consists of two interfaces, IHtmlTrLoadBalancer and IHtmlTrLauncher. An implementation of these interfaces also relies on an XML configuration file, called htmltransinfo.xml, which resides on the server running Windows SharePoint Services.

  • The IHtmlTrLoadBalancer interface helps to select the server on which to run the custom converter application.
  • The IHtmlTrLauncher interface launches the custom converter application and returns the HTML results to Windows SharePoint Services.
  • The htmltransinfo.xml file redirects the document request to an handler page, which calls the load balancer and launcher components. The following iexample of the .xml configuration file shows the entries for Microsoft Office   2003 document types used in conjunction with the custom Microsoft Office HTML conversion tool that is supplied as part of the Office   2003 Resource Kit:

 

<HtmlTrInfo>
    <Mapping Extension="xls" AcceptHeader="application/vnd.ms-excel" HandlerUrl="HtmlTranslate.aspx" ProgId="SharePoint.OpenDocuments.2"/>
    <Mapping Extension="doc" AcceptHeader="application/msword" HandlerUrl="HtmlTranslate.aspx"  ProgId="SharePoint.OpenDocuments.2"/>
    <Mapping Extension="ppt" AcceptHeader="application/vnd.ms-powerpoint" HandlerUrl="HtmlTranslate.aspx"  ProgId="SharePoint.OpenDocuments.2"/>
    <Mapping Extension="pps" AcceptHeader="application/vnd.ms-powerpoint" HandlerUrl="HtmlTranslate.aspx"  ProgId=""/>
</HtmlTrInfo>

How the Microsoft.HtmlTrans Namespace Works

The following sequence of events occurs when a user requests a document from a server running Windows SharePoint Services:

  1. Windows SharePoint Services identifies the file extension of the document in the htmltransinfo.xml file. If found, Windows SharePoint Services retrieves the matching AcceptHeader attribute; if not found, Windows SharePoint Services prompts the user to download the document.
  2. Windows SharePoint Services checks the AcceptHeader attribute value against the Accept-Header HTTP header of the request to see whether the client computer recognizes the requested document type. If so, Windows SharePoint Services delivers the document in its native format.
  3. Windows SharePoint Services also retrieves the ProgId attribute from the htmltransinfo.xml file and attempts to open the file on the client computer by using the component designated by the ProgId. If this attempt fails, Windows SharePoint Services continues with the HTML conversion process.
  4. If the client computer does not recognize the requested document type, Windows SharePoint Services prompts the user: “Do you want to convert the document for viewing in the browser?†If the user chooses not to convert the document, Windows SharePoint Services prompts the user to download the document instead.
  5. If the user chooses to convert the document, Windows SharePoint Services forwards the request to the handler page specified by the HandlerUrl attribute in the htmltransinfo.xml file. The handler page manages the conversion process and delivers the converted file to the user for viewing in the browser.

 

Options for Implementing Custom Document Conversion

Every implementation of custom document conversion on the Windows SharePoint Services platform requires at least the following features:

  • An entry in the htmltransinfo.xml file for the document type
  • A handler page that launches the document conversion process and returns the HTML output to the user
  • A set of custom conversion components

 

You must choose among three methods to build the set of custom conversion components:

  1. Build custom implementations of the IHtmlTrLoadBalancer and IHtmlTrLauncher interfaces to launch a custom converter application and return its results to Windows SharePoint Services.
  2. Build a set of custom conversion components that do not use the Microsoft.HtmlTrans interfaces at all.
  3. Call the custom implementations of the IHtmlTrLoadBalancer and IHtmlTrLauncher interfaces provided as part of the Office   2003 Resource Kit and provide a custom converter application for the IHtmlTrLauncher implementation to call.

 

Pour plus d'informations vous pouvez me contactez sur mon E-mail: EROL GIRAUDY.

 

 

Ce document préliminaire pourra être modifié de façon substantielle avant sa diffusion commerciale. Il est fourni uniquement à titre d’information et Microsoft ainsi que EROL n’apportent aucune garantie, explicite ou implicite, le concernant. Les informations présentées dans le présent document peuvent être modifiées sans préavis. L’utilisateur reconnaît assumer tous les risques liés à l'utilisation ou aux résultats de l’utilisation de ce document. Les exemples de sociétés, d’organisations, de produits, de personnes et d’événements décrits dans ce document sont fictifs. Aucune association avec une société, une organisation, un produit, une personne ou un événement réel n’a été voulue ou ne doit être déduite. L’utilisateur est tenu de respecter toutes les lois applicables en matière de droits d’auteur. Sans restriction des droits dérivés des droits d’auteur, aucune partie de ce document ne peut être reproduite, stockée ou introduite dans un système de récupération de données ou transmise à quelque fin ou par quelque moyen que ce soit (électronique, mécanique, photocopie, enregistrement ou autre) ou dans quelque but que ce soit sans la permission expresse et écrite de Microsoft Corporation.
Les produits mentionnés dans ce document peuvent être couverts par des brevets, des dépôts de brevets en cours, des marques, des droits d’auteur ou d’autres droits de propriété intellectuelle et industrielle de Microsoft. Sauf indication expresse figurant dans un contrat de licence écrit émanant de Microsoft, la fourniture de ce document ne vous concède aucune licence sur ces brevets, marques, droits d’auteur ou autres droits de propriété intellectuelle.
Microsoft, Windows, ActiveX, FrontPage, Visual Basic et Visual InterDev sont soit des marques de Microsoft Corporation, soit des marques déposées de Microsoft Corporation aux États-Unis d’Amérique et/ou dans d’autres pays.
Les noms de sociétés et de produits mentionnés sont des marques de leurs propriétaires respectifs.

EROL / TRUC 7 : 13-août-2004 09:53:44 +0200  

 

Retour page Accueil ] Remonter ]

Envoyez un courrier électronique à EROL GIRAUDY (attention nospam dans l'E-mail) pour toute question ou remarque concernant ce site Web et visitez la rubrique Condition Utilisation et CNIL. Copyright © 2002 EROL (les sigles et logos ci-après sont la propriété de : Microsoft, Supinfo, Adobe, Compaq, HP, Sybari, Veritas, Moreover, K-map, Vyapin, Plumtree, Ixos, TooStore, K-Map, eRoom, DocKIT,NQL, Only4gurus, Nsius, Sharepointexperts, Iora, Erol, KCura, FrontPages, Nsi, Frontlook, IBuySpyPortal, moreover, slipstick, networknowledge, clubsps.org )
Dernière modification : vendredi, 13. août 2004 09:53