Java-based APIs for conversion workflow id175UB30E05Z
NOTE
The following Java-based APIs allow you to convert HTML and Word documents into DITA format. These APIs are available in the form of a bundle. You must include this bundle in your code to use these APIs.
Bundle details:
-
Group ID: com.adobe.fmdita
-
Artifact ID: api
-
Version: 3.2
-
Package: com.adobe.fmdita.api.conversion
-
Class details:
code language-java public class ConversionUtils extends ObjectThe ConversionUtils class contain methods for converting HTML and Word documents into DITA format.
Convert HTML documents
The convertHtmlToDita method converts HTML documents into DITA format.
Syntax:
public static void convertHtmlToDita(Session session,
String inputFile,
String destPath,
boolean createRev)
throws RepositoryException, WorkflowException
Parameters:
Name
Type
Description
sessionjavax.jcr.Session
A valid JCR session.
inputFileString
Absolute path of the source HTML files in AEM repository.
destPathString
Absolute path of the destination location where the converted DITA files will be saved.
createRevBoolean
Specify whether a revision of the files is created (
true) at the specified destination or not ( false). This is considered only when the destination location contains an existing version of the converted files.Exception:
Throws RepositoryException.
Convert Word documents
The convertWordToDita method converts Word documents into DITA format.
Syntax:
public static void convertWordToDita(Session session,
String inputFile,
String destPath,
String style2tagMap,
boolean createRev)
throws RepositoryException, WorkflowException
Parameters:
Name
Type
Description
sessionjavax.jcr.Session
A valid JCR session.
inputFileString
Absolute path of the source Word files in AEM repository.
destPathString
Absolute path of the destination location where the converted DITA files will be saved.
style2tagMapString
Absolute path of the style mapping file that will be used for conversion.
createRevBoolean
Specify whether a revision of the files is created (
true) at the specified destination or not ( false). This is considered only when the destination location contains an existing version of the converted files.Exception:
Throws RepositoryException.
recommendation-more-help
11125c99-e1a1-4369-b5d7-fb3098b9b178