Package org.pptx4j.convert.in.xhtml
Class XHTMLtoPPTX
java.lang.Object
org.pptx4j.convert.in.xhtml.XHTMLtoPPTX
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 Summary
ConstructorsConstructorDescriptionXHTMLtoPPTX(org.docx4j.openpackaging.packages.PresentationMLPackage pmlPackage, org.docx4j.openpackaging.parts.PresentationML.SlidePart slidePart, String content, String baseUrl) -
Method Summary
Modifier and TypeMethodDescriptionConvert the well formed XHTML contained in the string to a list of PML objects.getCascadedProperties(com.openhtmltopdf.css.style.CalculatedStyle cs) protected ListHelpervoidsetTxBodyShapeTemplate(String tXBODY_SHAPE) Use this to specify the shape to fill with paragraphs content.
-
Constructor Details
-
Method Details
-
setTxBodyShapeTemplate
Use this to specify the shape to fill with paragraphs content. -
convertSingleSlide
Convert the well formed XHTML contained in the string to a list of PML objects.- Parameters:
content-baseUrl-presentationMLPackage-slidePart-- Returns:
- Throws:
Exception
-
getCascadedProperties
-
getListHelper
-