org.sejda.impl.itext.component.ITextOutlineHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sejda-itext Show documentation
Show all versions of sejda-itext Show documentation
Package containing tasks implemented using iText
/*
* Created on 07/ago/2011
* Copyright 2010 by Andrea Vacondio ([email protected]).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.sejda.impl.itext.component;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import static org.sejda.impl.itext.component.ITextOutlineUtils.KIDS_KEY;
import static org.sejda.impl.itext.component.ITextOutlineUtils.getMaxBookmarkLevel;
import static org.sejda.impl.itext.component.ITextOutlineUtils.getPageNumber;
import static org.sejda.impl.itext.component.ITextOutlineUtils.isGoToAction;
import static org.sejda.impl.itext.component.ITextOutlineUtils.nullSafeGetTitle;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.sejda.model.outline.OutlineGoToPageDestinations;
import org.sejda.model.outline.OutlineHandler;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.SimpleBookmark;
/**
* iText implementation of an {@link OutlineHandler}.
*
* @author Andrea Vacondio
*
*/
public class ITextOutlineHandler implements OutlineHandler {
private Pattern titleMatchingPattern = Pattern.compile(".+");
private List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy