@@ -71,6 +71,13 @@ protected PdfFileSpec(PdfObject pdfObject) {
71
71
super (pdfObject );
72
72
}
73
73
74
+ /**
75
+ * Wrap the passed {@link PdfObject} to the specific {@link PdfFileSpec} object,
76
+ * according to the type of the passed pdf object.
77
+ *
78
+ * @param fileSpecObject object to wrap
79
+ * @return wrapped {@link PdfFileSpec} instance
80
+ */
74
81
public static PdfFileSpec wrapFileSpecObject (PdfObject fileSpecObject ) {
75
82
if (fileSpecObject != null ) {
76
83
if (fileSpecObject .isString ()) {
@@ -82,6 +89,16 @@ public static PdfFileSpec wrapFileSpecObject(PdfObject fileSpecObject) {
82
89
return null ;
83
90
}
84
91
92
+ /**
93
+ * Create an external file specification.
94
+ *
95
+ * @param doc {@link PdfDocument} instance to make this file specification indirect
96
+ * @param filePath file specification string, describing the path to the external file
97
+ * @param afRelationshipValue value that represents the relationship between the component of the passed PDF document
98
+ * that refers to this file specification and the associated file. If <CODE>null</CODE>,
99
+ * {@link PdfName#Unspecified} will be added.
100
+ * @return {@link PdfFileSpec} containing the file specification of the file
101
+ */
85
102
public static PdfFileSpec createExternalFileSpec (PdfDocument doc , String filePath , PdfName afRelationshipValue ) {
86
103
PdfDictionary dict = new PdfDictionary ();
87
104
dict .put (PdfName .Type , PdfName .Filespec );
@@ -95,6 +112,13 @@ public static PdfFileSpec createExternalFileSpec(PdfDocument doc, String filePat
95
112
return (PdfFileSpec ) new PdfFileSpec (dict ).makeIndirect (doc );
96
113
}
97
114
115
+ /**
116
+ * Create an external file specification.
117
+ *
118
+ * @param doc {@link PdfDocument} instance to make this file specification indirect
119
+ * @param filePath file specification string, describing the path to the external file
120
+ * @return {@link PdfFileSpec} containing the file specification of the file
121
+ */
98
122
public static PdfFileSpec createExternalFileSpec (PdfDocument doc , String filePath ) {
99
123
return createExternalFileSpec (doc , filePath , null );
100
124
}
0 commit comments