Class AddImagesExceedingPageDimToAttachmentsProcessor

  • All Implemented Interfaces:
    HTMLPostLayoutProcessor

    public class AddImagesExceedingPageDimToAttachmentsProcessor
    extends Object
    implements HTMLPostLayoutProcessor
    This processor takes care of replacing all the image html nodes which overflow the pdf document's width with a <span>{placeholderText}</span> placeholder. The original image streams are added to the unused Streams of the html document's StreamResolver and therefore to the attachments part of the resulting PDF document.
    • Constructor Detail

      • AddImagesExceedingPageDimToAttachmentsProcessor

        public AddImagesExceedingPageDimToAttachmentsProcessor()
    • Method Detail

      • postLayout

        public boolean postLayout​(ProcessingContext context,
                                  com.levigo.jadice.server.html2fop.internal.HtmlLayoutResult layoutResult)
        Replaces all html image elements that overflow the width with a <span>{placeholderText}</span> element.
        Specified by:
        postLayout in interface HTMLPostLayoutProcessor
        Parameters:
        context - contains the general processing context that is needed to process HTML documents.
        layoutResult - the layout result of the previous layout run.
        Returns:
        true if a relayout process is necessary otherwise false.