Class ScroogeXHTMLBase

java.lang.Object
com.scroogexhtml.converter.ScroogeXHTMLBase
All Implemented Interfaces:
ConversionConfiguration, Serializable
Direct Known Subclasses:
ScroogeXHTMLMain

public abstract class ScroogeXHTMLBase extends Object implements Serializable, ConversionConfiguration
ScroogeXHTMLBase defines the converter properties.
See Also:
  • Field Details

    • NBSP

      public static final Character NBSP
      NON_BREAKING_SPACE - non-breaking space.
    • NBSPS

      public static final String NBSPS
      String constant for non-breaking spaces.

      This constant represents two non-breaking spaces ("  "). Non-breaking spaces are used to insert whitespace that will not be collapsed or trimmed by the browser when rendering HTML content.

      See Also:
  • Constructor Details

    • ScroogeXHTMLBase

      public ScroogeXHTMLBase()
  • Method Details

    • getName

      public static String getName()
      Returns the name of the software.
      Returns:
      the name of the software.
    • addPostProcessListener

      public void addPostProcessListener(PostProcessListener listener)
      Adds a post-process listener.

      The converter executes post-process listeners in the order they have been added. The converter creates and adds no post-process handlers by default (on creation). Note: post-processing may lead to a significant increase of conversion time.

      Parameters:
      listener - the post-process listener
    • removePostProcessListener

      public void removePostProcessListener(PostProcessListener listener)
      Removes a post-process listener.
      Parameters:
      listener - the post-process listener
    • setAddOuterHTML

      public void setAddOuterHTML(boolean newValue)
      Enables embedding the generated markup in a stand-alone document.

      Set this property to true to include the HTML header section, and place the generated HTML between the <body> and </body> tags. This allows to create 'stand-alone' HTML output documents.

      Parameters:
      newValue - The new addOuterHTML value
      See Also:
      Default value:
      false
    • setConvertBookmarks

      public void setConvertBookmarks(boolean newValue)
      Set this property to true to activate bookmark conversion.
      Parameters:
      newValue - the new convertBookmarks value
      See Also:
      Default value:
      false
    • setConvertEmptyParagraphs

      public void setConvertEmptyParagraphs(boolean newValue)
      Enable conversion of empty paragraphs to line break tags (<br />).
      Parameters:
      newValue - The new convertEmptyParagraphs value
      See Also:
      Default value:
      false
    • setConvertFootnotes

      public void setConvertFootnotes(boolean newValue)
      Set this property to true to enable conversion of footnotes.
      Parameters:
      newValue - The new convertFootnotes value
      See Also:
      Default value:
      false
    • setConvertHyperlinks

      public void setConvertHyperlinks(boolean newValue)
      Enable conversion of hyperlinks.

      Parameters:
      newValue - The new convertHyperlinks value
      See Also:
      Default value:
      false
    • setConvertPictures

      public void setConvertPictures(boolean newValue)
      Set this property to true to processing of picture data.
      Parameters:
      newValue - The new convertPictures value
      See Also:
      Default value:
      false
    • setConvertTables

      public void setConvertTables(boolean newValue)
      Set this property to true to enable table conversion.
      Parameters:
      newValue - The new convertTables value
      See Also:
      Default value:
      false
    • setDefaultFontColor

      public void setDefaultFontColor(String newValue)
      Use this property to optimize the HTML code generation.

      For example, if most of the document uses black text, define black (#000000) as the default font color in the component and in the style sheet. The converter will now only create a font color attribute if the text color is not black. Note: only effective if IncludeDefaultFontStyle is set to true.

      Parameters:
      newValue - The new defaultFontColor value
      See Also:
      Default value:
      DEF_FONT_COLOR
    • setDefaultFontName

      public void setDefaultFontName(String newValue)
      Use this property to optimize the HTML code generation.

      For example, if most of the document uses the font 'Times', define it as the default font name in the component and in the style sheet. The converter will now only create a font name attribute if it is not 'Times'. Note: only effective if IncludeDefaultFontStyle is set to true.

      Parameters:
      newValue - The new defaultFontName value
      See Also:
      Default value:
      DEF_FONT_NAME
    • setDefaultFontSize

      public void setDefaultFontSize(int newValue)
      Use this property to optimize the HTML code generation.

      For example, if most of the document uses a 10-point font, define 10 as the default font size in the component and in the style sheet. The converter will now only create a font size attribute if it is not 10 pt. Note: only effective if IncludeDefaultFontStyle is set to true.

      Parameters:
      newValue - The new defaultFontSize value
      See Also:
      Default value:
      DEF_FONT_SIZE
    • setDefaultLanguage

      public void setDefaultLanguage(String newValue)
      Set the default language code.
      Parameters:
      newValue - the new defaultLanguage value.
      See Also:
      Default value:
      empty
    • setDocumentType

      public void setDocumentType(DocumentType newValue)
      Sets the documentType property.
      Parameters:
      newValue - the new documentType value
      See Also:
    • setFontReplacing

      public void setFontReplacing(FontReplacing fontReplacing)
      Sets the FontReplacing object.
      Parameters:
      fontReplacing - the new FontReplacing value.
    • setIndentAmount

      public void setIndentAmount(int newValue)
      This property specifies the indentation level.
      Parameters:
      newValue - the new indentAmount value
      See Also:
      Default value:
      2
    • setInvalidRtfHeaderAction

      public void setInvalidRtfHeaderAction(InvalidRtfHeaderAction newValue)
      Sets the action to be taken when an invalid RTF header is encountered.
      Parameters:
      newValue - the action to be taken
    • setPictureAdapter

      public void setPictureAdapter(PictureAdapter newValue)
      Set the picture adapter.
      Parameters:
      newValue - the new pictureAdapter value
      See Also:
    • setTabString

      public void setTabString(String newValue)
      String which will be used to replace a \\tab token.
      Parameters:
      newValue - The new tabString
      See Also:
      Default value:
      A sequence of eight non-breaking space characters (nbsp)
    • isAddOuterHTML

      public boolean isAddOuterHTML()
      Description copied from interface: ConversionConfiguration
      Returns true if the conversion will enclose the generated markup.
      Specified by:
      isAddOuterHTML in interface ConversionConfiguration
      Returns:
      true if the conversion will enclose the generated markup.
    • isConvertBookmarks

      public boolean isConvertBookmarks()
      Description copied from interface: ConversionConfiguration
      This property controls the conversion of bookmarks.
      Specified by:
      isConvertBookmarks in interface ConversionConfiguration
      Returns:
      true if the conversion of bookmarks is enabled.
    • isConvertEmptyParagraphs

      public boolean isConvertEmptyParagraphs()
      Description copied from interface: ConversionConfiguration
      This property controls the conversion of empty paragraphs to linebreaks. If enabled, the result markup will contain <br> or <br /> instead of empty <p> elements.
      Specified by:
      isConvertEmptyParagraphs in interface ConversionConfiguration
      Returns:
      true if the conversion of bookmarks to linebreaks is enabled.
    • isConvertFootnotes

      public boolean isConvertFootnotes()
      Description copied from interface: ConversionConfiguration
      This property controls the conversion of footnotes.
      Specified by:
      isConvertFootnotes in interface ConversionConfiguration
      Returns:
      true if the conversion of footnotes is enabled.
    • isConvertHyperlinks

      public boolean isConvertHyperlinks()
      Description copied from interface: ConversionConfiguration
      This property controls the conversion of hyperlinks.
      Specified by:
      isConvertHyperlinks in interface ConversionConfiguration
      Returns:
      true if the conversion of hyperlinks is enabled.
    • isConvertPictures

      public boolean isConvertPictures()
      Description copied from interface: ConversionConfiguration
      This property controls the conversion of pictures.
      Specified by:
      isConvertPictures in interface ConversionConfiguration
      Returns:
      true if the conversion of pictures is enabled.
    • isConvertTables

      public boolean isConvertTables()
      Description copied from interface: ConversionConfiguration
      This property controls the conversion of tables.
      Specified by:
      isConvertTables in interface ConversionConfiguration
      Returns:
      true if the conversion of tables is enabled.
    • getDefaultFontColor

      public String getDefaultFontColor()
      Description copied from interface: ConversionConfiguration
      This property contains the default font color.
      Specified by:
      getDefaultFontColor in interface ConversionConfiguration
      Returns:
      the default font color.
    • getDefaultFontName

      public String getDefaultFontName()
      Description copied from interface: ConversionConfiguration
      This property contains the default font name.
      Specified by:
      getDefaultFontName in interface ConversionConfiguration
      Returns:
      the default font name.
    • getDefaultFontSize

      public int getDefaultFontSize()
      Description copied from interface: ConversionConfiguration
      This property contains the default font size.
      Specified by:
      getDefaultFontSize in interface ConversionConfiguration
      Returns:
      the default font size.
    • getDefaultLanguage

      public String getDefaultLanguage()
      Description copied from interface: ConversionConfiguration
      This property contains the default language.
      Specified by:
      getDefaultLanguage in interface ConversionConfiguration
      Returns:
      the default language.
    • getDocumentType

      public DocumentType getDocumentType()
      Description copied from interface: ConversionConfiguration
      This property contains the output document type.
      Specified by:
      getDocumentType in interface ConversionConfiguration
      Returns:
      the output document type.
    • getFontReplacing

      public FontReplacing getFontReplacing()
    • getFontSizeUnit

      public LengthUnit getFontSizeUnit()
      Description copied from interface: ConversionConfiguration
      This property contains the font size unit.
      Specified by:
      getFontSizeUnit in interface ConversionConfiguration
      Returns:
      the font size unit.
    • isIncludeDefaultFontStyle

      public boolean isIncludeDefaultFontStyle()
      Description copied from interface: ConversionConfiguration
      If this property is set to true, the HTML head section will include a CSS definition for the default font style.
      Specified by:
      isIncludeDefaultFontStyle in interface ConversionConfiguration
      Returns:
      true if the CSS definition for the default font style will be included.
    • getIndentAmount

      public int getIndentAmount()
      Description copied from interface: ConversionConfiguration
      This property contains the number of blanks in the output indentation.
      Specified by:
      getIndentAmount in interface ConversionConfiguration
      Returns:
      the number of blanks in the output indentation.
    • getInvalidRtfHeaderAction

      public InvalidRtfHeaderAction getInvalidRtfHeaderAction()
      Retrieves the invalid RTF header action.
      Returns:
      The invalid RTF header action.
    • getPictureAdapter

      public PictureAdapter getPictureAdapter()
    • getPostProcessListeners

      public List<PostProcessListener> getPostProcessListeners()
      Description copied from interface: ConversionConfiguration
      This property contains the list of post-process listeners. The returned list is unmodifiable.
      Specified by:
      getPostProcessListeners in interface ConversionConfiguration
      Returns:
      the list of post-process listeners.
    • getTabString

      public String getTabString()
      Description copied from interface: ConversionConfiguration
      This property contains the tab string.
      Specified by:
      getTabString in interface ConversionConfiguration
      Returns:
      the tab string.
    • getVersion

      public static String getVersion()
      Retrieves the version of the software.
      Returns:
      the version of the application as a String.
    • getCharPropConvConfig

      public CharPropConfiguration getCharPropConvConfig()
      Returns:
      the configuration bean for character conversion options.
    • getParaPropConvConfig

      public ParaPropConfiguration getParaPropConvConfig()
      Returns:
      the configuration bean for paragraph conversion options.
    • getTablePropConvConfig

      public TablePropConfiguration getTablePropConvConfig()
      Returns:
      the configuration bean for table property conversion options.
    • getHtmlHeadConfig

      public HtmlHeadConfiguration getHtmlHeadConfig()
      Returns:
      the configuration bean for HTML head section options.
    • getListConversionConfig

      public ListConversionConfiguration getListConversionConfig()
      Returns:
      the configuration bean for list section processing.
    • getHeaderFooterConfiguration

      public HeaderFooterConfiguration getHeaderFooterConfiguration()
      Returns:
      the configuration bean for header and footer conversion.
    • isConvertFontBGColor

      public boolean isConvertFontBGColor()
      Specified by:
      isConvertFontBGColor in interface ConversionConfiguration
    • isConvertFontColor

      public boolean isConvertFontColor()
      Specified by:
      isConvertFontColor in interface ConversionConfiguration
    • isConvertFontHLColor

      public boolean isConvertFontHLColor()
      Specified by:
      isConvertFontHLColor in interface ConversionConfiguration
    • isConvertFontName

      public boolean isConvertFontName()
      Specified by:
      isConvertFontName in interface ConversionConfiguration
    • isConvertFontSize

      public boolean isConvertFontSize()
      Specified by:
      isConvertFontSize in interface ConversionConfiguration
    • isConvertFontStyle

      public boolean isConvertFontStyle()
      Specified by:
      isConvertFontStyle in interface ConversionConfiguration
    • isConvertLanguage

      public boolean isConvertLanguage()
      Specified by:
      isConvertLanguage in interface ConversionConfiguration
    • isConvertAlignment

      public boolean isConvertAlignment()
      Specified by:
      isConvertAlignment in interface ConversionConfiguration
    • isConvertIndent

      public boolean isConvertIndent()
      Specified by:
      isConvertIndent in interface ConversionConfiguration
    • isConvertParagraphMargins

      public boolean isConvertParagraphMargins()
      Specified by:
      isConvertParagraphMargins in interface ConversionConfiguration