Class HtmlProcessingUtil
- java.lang.Object
-
- com.levigo.jadice.server.html2fop.internal.process.HtmlProcessingUtil
-
public class HtmlProcessingUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description HtmlProcessingUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Dimension2D
fitBounds(Dimension2D sourceSize, Dimension2D maxSize)
This method calculates the scaled bounds depending on the available maximum image bounds defined by maxSize.static void
replaceImageWithPlaceholder(org.w3c.dom.html2.HTMLImageElement element, StreamDescriptor descriptor)
Replaces an image element that has a valid src attribute with a placeholder element.static void
replaceImageWithPlaceholderAndAddStreamToUnused(StreamResolver r, org.w3c.dom.html2.HTMLImageElement htmlImageElement)
-
-
-
Method Detail
-
replaceImageWithPlaceholder
public static void replaceImageWithPlaceholder(org.w3c.dom.html2.HTMLImageElement element, StreamDescriptor descriptor)
Replaces an image element that has a valid src attribute with a placeholder element.- Parameters:
element
- image element with valid src attribute.descriptor
- used for extracting a placeholder text.
-
replaceImageWithPlaceholderAndAddStreamToUnused
public static void replaceImageWithPlaceholderAndAddStreamToUnused(StreamResolver r, org.w3c.dom.html2.HTMLImageElement htmlImageElement)
-
fitBounds
public static Dimension2D fitBounds(Dimension2D sourceSize, Dimension2D maxSize)
This method calculates the scaled bounds depending on the available maximum image bounds defined by maxSize.- Parameters:
sourceSize
- the original dimensions.maxSize
- the available space dimensions.- Returns:
- the recalculated bounds.
-
-