1 /* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.graphics.pdf; 18 19 import android.annotation.IntDef; 20 21 import androidx.annotation.RestrictTo; 22 23 import java.lang.annotation.Retention; 24 import java.lang.annotation.RetentionPolicy; 25 26 /** 27 * This class holds the set of constants representing the type of PDF document. 28 * 29 * @hide 30 */ 31 public final class PdfLinearizationTypes { 32 /** Represents the type of PDF document that cannot be determined. */ 33 public static final int PDF_DOCUMENT_TYPE_UNKNOWN = 0; 34 35 /** Represents a non-linearized PDF document. */ 36 public static final int PDF_DOCUMENT_TYPE_NON_LINEARIZED = 1; 37 38 /** Represents a linearized PDF document. */ 39 public static final int PDF_DOCUMENT_TYPE_LINEARIZED = 2; 40 PdfLinearizationTypes()41 private PdfLinearizationTypes() { 42 } 43 44 /** @hide */ 45 @RestrictTo(RestrictTo.Scope.LIBRARY) 46 @Retention(RetentionPolicy.SOURCE) 47 @IntDef(prefix = {"PDF_DOCUMENT_TYPE_"}, value = {PDF_DOCUMENT_TYPE_UNKNOWN, 48 PDF_DOCUMENT_TYPE_NON_LINEARIZED, 49 PDF_DOCUMENT_TYPE_LINEARIZED}) 50 public @interface PdfLinearizationType { 51 } 52 } 53