Class XHTMLtoPPTX

java.lang.Object
org.pptx4j.convert.in.xhtml.XHTMLtoPPTX

public class XHTMLtoPPTX extends Object
XHTML typically contains text (in p, div/span or li), tables and images. A pptx slide contains a shape tree. You can't put text, tables and images into a single shape. We want to: - retain the content order, so we put things sequentially into shapes - put as much sequential text into a single shape as possible. So, we always re-use the existing shape, until a table or image is encountered, whereupon a new shape is required. There are 2 use-cases: 1. the general one: give me shapes corresponding to this XHTML 2. the specific text-only one: put this snippet of XHTML into the shape provided (tables TODO will be ignored or converted to text; images TODO will be ignored or exception?) The method setTxBodyShapeTemplate allows you to
Author:
jharr
  • Constructor Details

    • XHTMLtoPPTX

      public XHTMLtoPPTX(org.docx4j.openpackaging.packages.PresentationMLPackage pmlPackage, org.docx4j.openpackaging.parts.PresentationML.SlidePart slidePart, String content, String baseUrl) throws Exception
      Throws:
      Exception
  • Method Details

    • setTxBodyShapeTemplate

      public void setTxBodyShapeTemplate(String tXBODY_SHAPE)
      Use this to specify the shape to fill with paragraphs content.
    • convertSingleSlide

      public List<Object> convertSingleSlide() throws Exception
      Convert the well formed XHTML contained in the string to a list of PML objects.
      Parameters:
      content -
      baseUrl -
      presentationMLPackage -
      slidePart -
      Returns:
      Throws:
      Exception
    • getCascadedProperties

      public Map<String,com.openhtmltopdf.css.parser.PropertyValue> getCascadedProperties(com.openhtmltopdf.css.style.CalculatedStyle cs)
    • getListHelper

      protected ListHelper getListHelper()