@@ -0,0 +1,2124 @@
+/*%0A * Copyright 2018 The Apache Software Foundation.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.apache.pdfbox.pdmodel.interactive.annotation;%0A%0Aimport org.apache.pdfbox.pdmodel.interactive.annotation.handlers.PDHighlightAppearanceHandler;%0Aimport org.apache.pdfbox.cos.COSDictionary;%0Aimport org.apache.pdfbox.pdmodel.interactive.annotation.handlers.PDAppearanceHandler;%0A%0A/**%0A *%0A * @author Paul King%0A */%0Apublic class PDAnnotationHighlight extends PDAnnotationTextMarkup%0A%7B%0A    /**%0A     * The type of annotation.%0A     */%0A    public static final String SUB_TYPE = %22Highlight%22;%0A%0A    private PDAppearanceHandler appearanceHandler;%0A%0A     /**%0A     * Constructor.%0A     */%0A    public PDAnnotationHighlight()%0A    %7B%0A        super(SUB_TYPE);%0A    %7D%0A%0A    /**%0A     * Constructor.%0A     *%0A     * @param dict The annotations dictionary.%0A     */%0A    public PDAnnotationHighlight(COSDictionary dict)%0A    %7B%0A        super(dict);%0A    %7D%0A%0A    /**%0A     * Set a custom appearance handler for generating the annotations appearance streams.%0A     * %0A     * @param appearanceHandler%0A     */%0A    public void setCustomHighlightAppearanceHandler(PDAppearanceHandler appearanceHandler)%0A    %7B%0A        this.appearanceHandler = appearanceHandler;%0A    %7D%0A%0A    @Override%0A    public void constructAppearances()%0A    %7B%0A        if (appearanceHandler == null)%0A        %7B%0A            PDHighlightAppearanceHandler appearanceHandler = new PDHighlightAppearanceHandler(this);%0A            appearanceHandler.generateAppearanceStreams();%0A        %7D%0A        else%0A        %7B%0A            appearanceHandler.generateAppearanceStreams();%0A        %7D%0A    %7D%0A%7D%0A

Split highlight, underline, strikeout and squiggly from text markup annotation