1// Signature format: 2.0
2package android.graphics.pdf {
3
4  @FlaggedApi("android.graphics.pdf.flags.enable_pdf_viewer") public final class LoadParams {
5    method @Nullable public String getPassword();
6  }
7
8  public static final class LoadParams.Builder {
9    ctor public LoadParams.Builder();
10    method @NonNull public android.graphics.pdf.LoadParams build();
11    method @NonNull public android.graphics.pdf.LoadParams.Builder setPassword(@Nullable String);
12  }
13
14  @FlaggedApi("android.graphics.pdf.flags.enable_pdf_viewer") public final class PdfRendererPreV implements java.lang.AutoCloseable {
15    ctor public PdfRendererPreV(@NonNull android.os.ParcelFileDescriptor) throws java.io.IOException;
16    ctor public PdfRendererPreV(@NonNull android.os.ParcelFileDescriptor, @NonNull android.graphics.pdf.LoadParams) throws java.io.IOException;
17    method public void close();
18    method public int getDocumentLinearizationType();
19    method @IntRange(from=0) public int getPageCount();
20    method @FlaggedApi("android.graphics.pdf.flags.enable_form_filling") public int getPdfFormType();
21    method @NonNull public android.graphics.pdf.PdfRendererPreV.Page openPage(@IntRange(from=0) int);
22    method public void write(@NonNull android.os.ParcelFileDescriptor, boolean) throws java.io.IOException;
23    field public static final int DOCUMENT_LINEARIZED_TYPE_LINEARIZED = 1; // 0x1
24    field public static final int DOCUMENT_LINEARIZED_TYPE_NON_LINEARIZED = 0; // 0x0
25    field @FlaggedApi("android.graphics.pdf.flags.enable_form_filling") public static final int PDF_FORM_TYPE_ACRO_FORM = 1; // 0x1
26    field @FlaggedApi("android.graphics.pdf.flags.enable_form_filling") public static final int PDF_FORM_TYPE_NONE = 0; // 0x0
27    field @FlaggedApi("android.graphics.pdf.flags.enable_form_filling") public static final int PDF_FORM_TYPE_XFA_FOREGROUND = 3; // 0x3
28    field @FlaggedApi("android.graphics.pdf.flags.enable_form_filling") public static final int PDF_FORM_TYPE_XFA_FULL = 2; // 0x2
29  }
30
31  public final class PdfRendererPreV.Page implements java.lang.AutoCloseable {
32    method @FlaggedApi("android.graphics.pdf.flags.enable_form_filling") @NonNull public java.util.List<android.graphics.Rect> applyEdit(@NonNull android.graphics.pdf.models.FormEditRecord);
33    method public void close();
34    method @FlaggedApi("android.graphics.pdf.flags.enable_form_filling") @NonNull public android.graphics.pdf.models.FormWidgetInfo getFormWidgetInfoAtIndex(@IntRange(from=0) int);
35    method @FlaggedApi("android.graphics.pdf.flags.enable_form_filling") @NonNull public android.graphics.pdf.models.FormWidgetInfo getFormWidgetInfoAtPosition(int, int);
36    method @FlaggedApi("android.graphics.pdf.flags.enable_form_filling") @NonNull public java.util.List<android.graphics.pdf.models.FormWidgetInfo> getFormWidgetInfos();
37    method @FlaggedApi("android.graphics.pdf.flags.enable_form_filling") @NonNull public java.util.List<android.graphics.pdf.models.FormWidgetInfo> getFormWidgetInfos(@NonNull int[]);
38    method @NonNull public java.util.List<android.graphics.pdf.content.PdfPageGotoLinkContent> getGotoLinks();
39    method @IntRange(from=0) public int getHeight();
40    method @NonNull public java.util.List<android.graphics.pdf.content.PdfPageImageContent> getImageContents();
41    method @IntRange(from=0) public int getIndex();
42    method @NonNull public java.util.List<android.graphics.pdf.content.PdfPageLinkContent> getLinkContents();
43    method @NonNull public java.util.List<android.graphics.pdf.content.PdfPageTextContent> getTextContents();
44    method @IntRange(from=0) public int getWidth();
45    method public void render(@NonNull android.graphics.Bitmap, @Nullable android.graphics.Rect, @Nullable android.graphics.Matrix, @NonNull android.graphics.pdf.RenderParams);
46    method @NonNull public java.util.List<android.graphics.pdf.models.PageMatchBounds> searchText(@NonNull String);
47    method @Nullable public android.graphics.pdf.models.selection.PageSelection selectContent(@NonNull android.graphics.pdf.models.selection.SelectionBoundary, @NonNull android.graphics.pdf.models.selection.SelectionBoundary);
48  }
49
50  @FlaggedApi("android.graphics.pdf.flags.enable_pdf_viewer") public final class RenderParams {
51    method public int getRenderFlags();
52    method public int getRenderMode();
53    field public static final int FLAG_RENDER_HIGHLIGHT_ANNOTATIONS = 4; // 0x4
54    field public static final int FLAG_RENDER_TEXT_ANNOTATIONS = 2; // 0x2
55    field public static final int RENDER_MODE_FOR_DISPLAY = 1; // 0x1
56    field public static final int RENDER_MODE_FOR_PRINT = 2; // 0x2
57  }
58
59  public static final class RenderParams.Builder {
60    ctor public RenderParams.Builder(int);
61    method @NonNull public android.graphics.pdf.RenderParams build();
62    method @NonNull public android.graphics.pdf.RenderParams.Builder setRenderFlags(int);
63    method @NonNull public android.graphics.pdf.RenderParams.Builder setRenderFlags(int, int);
64  }
65
66}
67
68package android.graphics.pdf.content {
69
70  @FlaggedApi("android.graphics.pdf.flags.enable_pdf_viewer") public final class PdfPageGotoLinkContent implements android.os.Parcelable {
71    ctor public PdfPageGotoLinkContent(@NonNull java.util.List<android.graphics.RectF>, @NonNull android.graphics.pdf.content.PdfPageGotoLinkContent.Destination);
72    method public int describeContents();
73    method @NonNull public java.util.List<android.graphics.RectF> getBounds();
74    method @NonNull public android.graphics.pdf.content.PdfPageGotoLinkContent.Destination getDestination();
75    method public void writeToParcel(@NonNull android.os.Parcel, int);
76    field @NonNull public static final android.os.Parcelable.Creator<android.graphics.pdf.content.PdfPageGotoLinkContent> CREATOR;
77  }
78
79  public static final class PdfPageGotoLinkContent.Destination implements android.os.Parcelable {
80    ctor public PdfPageGotoLinkContent.Destination(int, float, float, float);
81    method public int describeContents();
82    method @IntRange(from=0) public int getPageNumber();
83    method @FloatRange(from=0.0f) public float getXCoordinate();
84    method @FloatRange(from=0.0f) public float getYCoordinate();
85    method @FloatRange(from=0.0f) public float getZoom();
86    method public void writeToParcel(@NonNull android.os.Parcel, int);
87    field @NonNull public static final android.os.Parcelable.Creator<android.graphics.pdf.content.PdfPageGotoLinkContent.Destination> CREATOR;
88  }
89
90  @FlaggedApi("android.graphics.pdf.flags.enable_pdf_viewer") public final class PdfPageImageContent implements android.os.Parcelable {
91    ctor public PdfPageImageContent(@NonNull String);
92    method public int describeContents();
93    method @NonNull public String getAltText();
94    method public void writeToParcel(@NonNull android.os.Parcel, int);
95    field @NonNull public static final android.os.Parcelable.Creator<android.graphics.pdf.content.PdfPageImageContent> CREATOR;
96  }
97
98  @FlaggedApi("android.graphics.pdf.flags.enable_pdf_viewer") public final class PdfPageLinkContent implements android.os.Parcelable {
99    ctor public PdfPageLinkContent(@NonNull java.util.List<android.graphics.RectF>, @NonNull android.net.Uri);
100    method public int describeContents();
101    method @NonNull public java.util.List<android.graphics.RectF> getBounds();
102    method @NonNull public android.net.Uri getUri();
103    method public void writeToParcel(@NonNull android.os.Parcel, int);
104    field @NonNull public static final android.os.Parcelable.Creator<android.graphics.pdf.content.PdfPageLinkContent> CREATOR;
105  }
106
107  @FlaggedApi("android.graphics.pdf.flags.enable_pdf_viewer") public final class PdfPageTextContent implements android.os.Parcelable {
108    ctor public PdfPageTextContent(@NonNull String);
109    ctor public PdfPageTextContent(@NonNull String, @NonNull java.util.List<android.graphics.RectF>);
110    method public int describeContents();
111    method @NonNull public java.util.List<android.graphics.RectF> getBounds();
112    method @NonNull public String getText();
113    method public void writeToParcel(@NonNull android.os.Parcel, int);
114    field @NonNull public static final android.os.Parcelable.Creator<android.graphics.pdf.content.PdfPageTextContent> CREATOR;
115  }
116
117}
118
119package android.graphics.pdf.models {
120
121  @FlaggedApi("android.graphics.pdf.flags.enable_form_filling") public final class FormEditRecord implements android.os.Parcelable {
122    method public int describeContents();
123    method @Nullable public android.graphics.Point getClickPoint();
124    method @IntRange(from=0) public int getPageNumber();
125    method @NonNull public int[] getSelectedIndices();
126    method @Nullable public String getText();
127    method public int getType();
128    method @IntRange(from=0) public int getWidgetIndex();
129    method public void writeToParcel(@NonNull android.os.Parcel, int);
130    field @NonNull public static final android.os.Parcelable.Creator<android.graphics.pdf.models.FormEditRecord> CREATOR;
131    field public static final int EDIT_TYPE_CLICK = 0; // 0x0
132    field public static final int EDIT_TYPE_SET_INDICES = 1; // 0x1
133    field public static final int EDIT_TYPE_SET_TEXT = 2; // 0x2
134  }
135
136  public static final class FormEditRecord.Builder {
137    ctor public FormEditRecord.Builder(int, @IntRange(from=0) int, @IntRange(from=0) int);
138    method @NonNull public android.graphics.pdf.models.FormEditRecord build();
139    method @NonNull public android.graphics.pdf.models.FormEditRecord.Builder setClickPoint(@Nullable android.graphics.Point);
140    method @NonNull public android.graphics.pdf.models.FormEditRecord.Builder setSelectedIndices(@Nullable int[]);
141    method @NonNull public android.graphics.pdf.models.FormEditRecord.Builder setText(@Nullable String);
142  }
143
144  @FlaggedApi("android.graphics.pdf.flags.enable_form_filling") public final class FormWidgetInfo implements android.os.Parcelable {
145    method public int describeContents();
146    method @Nullable public String getAccessibilityLabel();
147    method @FloatRange(from=0.0f) public float getFontSize();
148    method @NonNull public java.util.List<android.graphics.pdf.models.ListItem> getListItems();
149    method @IntRange(from=0xffffffff) public int getMaxLength();
150    method @Nullable public String getTextValue();
151    method @IntRange(from=0) public int getWidgetIndex();
152    method @NonNull public android.graphics.Rect getWidgetRect();
153    method public int getWidgetType();
154    method public boolean isEditableText();
155    method public boolean isMultiLineText();
156    method public boolean isMultiSelect();
157    method public boolean isReadOnly();
158    method public void writeToParcel(@NonNull android.os.Parcel, int);
159    field @NonNull public static final android.os.Parcelable.Creator<android.graphics.pdf.models.FormWidgetInfo> CREATOR;
160    field public static final int WIDGET_TYPE_CHECKBOX = 2; // 0x2
161    field public static final int WIDGET_TYPE_COMBOBOX = 4; // 0x4
162    field public static final int WIDGET_TYPE_LISTBOX = 5; // 0x5
163    field public static final int WIDGET_TYPE_PUSHBUTTON = 1; // 0x1
164    field public static final int WIDGET_TYPE_RADIOBUTTON = 3; // 0x3
165    field public static final int WIDGET_TYPE_SIGNATURE = 7; // 0x7
166    field public static final int WIDGET_TYPE_TEXTFIELD = 6; // 0x6
167    field public static final int WIDGET_TYPE_UNKNOWN = 0; // 0x0
168  }
169
170  public static final class FormWidgetInfo.Builder {
171    ctor public FormWidgetInfo.Builder(int, @IntRange(from=0) int, @NonNull android.graphics.Rect, @NonNull String, @NonNull String);
172    method @NonNull public android.graphics.pdf.models.FormWidgetInfo build();
173    method @NonNull public android.graphics.pdf.models.FormWidgetInfo.Builder setEditableText(boolean);
174    method @NonNull public android.graphics.pdf.models.FormWidgetInfo.Builder setFontSize(@FloatRange(from=0.0f) float);
175    method @NonNull public android.graphics.pdf.models.FormWidgetInfo.Builder setListItems(@NonNull java.util.List<android.graphics.pdf.models.ListItem>);
176    method @NonNull public android.graphics.pdf.models.FormWidgetInfo.Builder setMaxLength(@IntRange(from=0) int);
177    method @NonNull public android.graphics.pdf.models.FormWidgetInfo.Builder setMultiLineText(boolean);
178    method @NonNull public android.graphics.pdf.models.FormWidgetInfo.Builder setMultiSelect(boolean);
179    method @NonNull public android.graphics.pdf.models.FormWidgetInfo.Builder setReadOnly(boolean);
180  }
181
182  @FlaggedApi("android.graphics.pdf.flags.enable_form_filling") public final class ListItem implements android.os.Parcelable {
183    ctor public ListItem(@NonNull String, boolean);
184    method public int describeContents();
185    method @NonNull public String getLabel();
186    method public boolean isSelected();
187    method public void writeToParcel(@NonNull android.os.Parcel, int);
188    field @NonNull public static final android.os.Parcelable.Creator<android.graphics.pdf.models.ListItem> CREATOR;
189  }
190
191  @FlaggedApi("android.graphics.pdf.flags.enable_pdf_viewer") public final class PageMatchBounds implements android.os.Parcelable {
192    ctor public PageMatchBounds(@NonNull java.util.List<android.graphics.RectF>, int);
193    method public int describeContents();
194    method @NonNull public java.util.List<android.graphics.RectF> getBounds();
195    method public int getTextStartIndex();
196    method public void writeToParcel(@NonNull android.os.Parcel, int);
197    field @NonNull public static final android.os.Parcelable.Creator<android.graphics.pdf.models.PageMatchBounds> CREATOR;
198  }
199
200}
201
202package android.graphics.pdf.models.selection {
203
204  @FlaggedApi("android.graphics.pdf.flags.enable_pdf_viewer") public final class PageSelection implements android.os.Parcelable {
205    ctor public PageSelection(int, @NonNull android.graphics.pdf.models.selection.SelectionBoundary, @NonNull android.graphics.pdf.models.selection.SelectionBoundary, @NonNull java.util.List<android.graphics.pdf.content.PdfPageTextContent>);
206    method public int describeContents();
207    method public int getPage();
208    method @NonNull public java.util.List<android.graphics.pdf.content.PdfPageTextContent> getSelectedTextContents();
209    method @NonNull public android.graphics.pdf.models.selection.SelectionBoundary getStart();
210    method @NonNull public android.graphics.pdf.models.selection.SelectionBoundary getStop();
211    method public void writeToParcel(@NonNull android.os.Parcel, int);
212    field @NonNull public static final android.os.Parcelable.Creator<android.graphics.pdf.models.selection.PageSelection> CREATOR;
213  }
214
215  @FlaggedApi("android.graphics.pdf.flags.enable_pdf_viewer") public final class SelectionBoundary implements android.os.Parcelable {
216    ctor public SelectionBoundary(int);
217    ctor public SelectionBoundary(@NonNull android.graphics.Point);
218    method public int describeContents();
219    method public int getIndex();
220    method public boolean getIsRtl();
221    method @Nullable public android.graphics.Point getPoint();
222    method public void writeToParcel(@NonNull android.os.Parcel, int);
223    field @NonNull public static final android.os.Parcelable.Creator<android.graphics.pdf.models.selection.SelectionBoundary> CREATOR;
224  }
225
226}
227
228