org.sejda.impl.itext.component.ITextOutlineUtils Maven / Gradle / Ivy
/*
* Created on 09/giu/2013
* Copyright 2011 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 java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
/**
* Utility class providing outline handling helper methods
*
* @author Andrea Vacondio
*
*/
public final class ITextOutlineUtils {
public static final String GOTO_VALUE = "GoTo";
public static final String ACTION_KEY = "Action";
public static final String PAGE_KEY = "Page";
public static final String KIDS_KEY = "Kids";
public static final String TITLE_KEY = "Title";
private static final Pattern PAGE_NUMBER_MATCHING_PATTERN = Pattern.compile("(\\d+)(.*)");
private ITextOutlineUtils() {
// utility
}
static int getMaxBookmarkLevel(List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy