{{tag>Programmers_Reference, Custom_Document_types}} [<10>] ====== Adding custom document types ====== //**Aware IM**// comes with a number of predefined document types: - ''Report'', ''MS Word'', ''Text'', ''MS Excel'', ''HTML''. These documents types should be sufficient for most applications. If, however, an application uses other document formats new document types can be added to //**Aware IM**//. Note that adding new document types is only necessary if you want to include tags in documents and you want //**Aware IM**// to replace tags with specific attribute values at run time. If you want to use documents without modifying them you can just attach a document in any format to a form of a business object that has an attribute of the ''Document'' type defined and //**Aware IM**// will store the document in the database. In this case //**Aware IM**// does not need to know about the internal structure of the document. To add a new document type to //**Aware IM**// follow the steps below: - Write the code for the component that will work with documents of the new type on the client side (see [[docs:3500:0600:0610]] for details). - Write the code for the component that will work with documents of the new type on the server side (see [[docs:3500:0600:0620]] for details). - Compile the source code of your components and package them in a jar file(s). Make sure that the jar file resides in the ''AwareIM/CustomJars'' directory (see section 2). - Add the definition of a new document type to the ''BASServer.props'' file located in the ''BIN'' directory of your //**Aware IM**// installation. You have to modify the line that sets the ''DocumentEngines'' property to add the fully qualified name of your server side component. For example (note text ''com.mypackage.MyServerDocEngine''): DocumentEngines=com.bas.basserver.documents.JasperReportsEngine,com.bas.basserver.documents.MSWordDocumentEngine,com.bas.basserver.documents.TextDocumentEngine,com.bas.basserver.documents.HtmlDocumentEngine,com.bas.basserver.documents.MSExcelDocumentEngine,com.mypackage.MyServerDocEngine Note that you have to make sure that the jar file with your server side component as well as the modifications to ''BASServer.props'' file are available to the Aware server that hosts your application (see [[docs:1100_inst_guide|Aware IM Installation Guide]] for details). If everything has been done correctly the new document type must appear in the list of document types displayed by the Document Template Property Editor (see [[docs:2500_config_apps:1300_add_edit_doctemp|Adding/Editing Document Templates]]). {{simplenavi>:docs:3500:0600:}}