@@ -46,16 +46,13 @@ This file is part of the iText (R) project.
46
46
import com .itextpdf .html2pdf .attach .Attacher ;
47
47
import com .itextpdf .html2pdf .exception .Html2PdfException ;
48
48
import com .itextpdf .io .util .FileUtil ;
49
+ import com .itextpdf .kernel .Version ;
49
50
import com .itextpdf .kernel .counter .event .IMetaInfo ;
50
51
import com .itextpdf .kernel .pdf .DocumentProperties ;
51
52
import com .itextpdf .kernel .pdf .PdfDocument ;
52
53
import com .itextpdf .kernel .pdf .PdfWriter ;
53
54
import com .itextpdf .layout .Document ;
54
55
import com .itextpdf .layout .element .IElement ;
55
- import java .lang .reflect .Array ;
56
- import java .lang .reflect .Constructor ;
57
- import java .lang .reflect .Method ;
58
- import com .itextpdf .kernel .Version ;
59
56
import com .itextpdf .styledxmlparser .IXmlParser ;
60
57
import com .itextpdf .styledxmlparser .node .IDocumentNode ;
61
58
import com .itextpdf .styledxmlparser .node .impl .jsoup .JsoupHtmlParser ;
@@ -66,6 +63,9 @@ This file is part of the iText (R) project.
66
63
import java .io .IOException ;
67
64
import java .io .InputStream ;
68
65
import java .io .OutputStream ;
66
+ import java .lang .reflect .Array ;
67
+ import java .lang .reflect .Constructor ;
68
+ import java .lang .reflect .Method ;
69
69
import java .util .List ;
70
70
71
71
/**
@@ -92,9 +92,8 @@ private HtmlConverter() {
92
92
*
93
93
* @param html the html in the form of a {@link String}
94
94
* @param pdfStream the PDF as an {@link OutputStream}
95
- * @throws IOException Signals that an I/O exception has occurred.
96
95
*/
97
- public static void convertToPdf (String html , OutputStream pdfStream ) throws IOException {
96
+ public static void convertToPdf (String html , OutputStream pdfStream ) {
98
97
convertToPdf (html , pdfStream , null );
99
98
}
100
99
@@ -105,9 +104,8 @@ public static void convertToPdf(String html, OutputStream pdfStream) throws IOEx
105
104
* @param html the html in the form of a {@link String}
106
105
* @param pdfStream the PDF as an {@link OutputStream}
107
106
* @param converterProperties a {@link ConverterProperties} instance
108
- * @throws IOException Signals that an I/O exception has occurred.
109
107
*/
110
- public static void convertToPdf (String html , OutputStream pdfStream , ConverterProperties converterProperties ) throws IOException {
108
+ public static void convertToPdf (String html , OutputStream pdfStream , ConverterProperties converterProperties ) {
111
109
convertToPdf (html , new PdfWriter (pdfStream ), converterProperties );
112
110
}
113
111
@@ -117,9 +115,8 @@ public static void convertToPdf(String html, OutputStream pdfStream, ConverterPr
117
115
*
118
116
* @param html the html in the form of a {@link String}
119
117
* @param pdfWriter the {@link PdfWriter} instance
120
- * @throws IOException Signals that an I/O exception has occurred.
121
118
*/
122
- public static void convertToPdf (String html , PdfWriter pdfWriter ) throws IOException {
119
+ public static void convertToPdf (String html , PdfWriter pdfWriter ) {
123
120
convertToPdf (html , pdfWriter , null );
124
121
}
125
122
@@ -130,9 +127,8 @@ public static void convertToPdf(String html, PdfWriter pdfWriter) throws IOExcep
130
127
* @param html the html in the form of a {@link String}
131
128
* @param pdfWriter the {@link PdfWriter} instance
132
129
* @param converterProperties a {@link ConverterProperties} instance
133
- * @throws IOException Signals that an I/O exception has occurred.
134
130
*/
135
- public static void convertToPdf (String html , PdfWriter pdfWriter , ConverterProperties converterProperties ) throws IOException {
131
+ public static void convertToPdf (String html , PdfWriter pdfWriter , ConverterProperties converterProperties ) {
136
132
convertToPdf (html , new PdfDocument (pdfWriter , new DocumentProperties ().setEventCountingMetaInfo (new HtmlMetaInfo ())), converterProperties );
137
133
}
138
134
@@ -143,9 +139,8 @@ public static void convertToPdf(String html, PdfWriter pdfWriter, ConverterPrope
143
139
* @param html the html in the form of a {@link String}
144
140
* @param pdfDocument the {@link PdfDocument} instance
145
141
* @param converterProperties a {@link ConverterProperties} instance
146
- * @throws IOException Signals that an I/O exception has occurred.
147
142
*/
148
- public static void convertToPdf (String html , PdfDocument pdfDocument , ConverterProperties converterProperties ) throws IOException {
143
+ public static void convertToPdf (String html , PdfDocument pdfDocument , ConverterProperties converterProperties ) {
149
144
Document document = convertToDocument (html , pdfDocument , converterProperties );
150
145
document .close ();
151
146
}
@@ -268,9 +263,8 @@ public static void convertToPdf(InputStream htmlStream, PdfDocument pdfDocument,
268
263
* @param html the html in the form of a {@link String}
269
264
* @param pdfWriter the {@link PdfWriter} containing the resulting PDF
270
265
* @return a {@link Document} instance
271
- * @throws IOException Signals that an I/O exception has occurred.
272
266
*/
273
- public static Document convertToDocument (String html , PdfWriter pdfWriter ) throws IOException {
267
+ public static Document convertToDocument (String html , PdfWriter pdfWriter ) {
274
268
return convertToDocument (html , pdfWriter , null );
275
269
}
276
270
@@ -296,9 +290,8 @@ public static Document convertToDocument(InputStream htmlStream, PdfWriter pdfWr
296
290
* @param pdfWriter the pdf writer
297
291
* @param converterProperties a {@link ConverterProperties} instance
298
292
* @return a {@link Document} instance
299
- * @throws IOException Signals that an I/O exception has occurred.
300
293
*/
301
- public static Document convertToDocument (String html , PdfWriter pdfWriter , ConverterProperties converterProperties ) throws IOException {
294
+ public static Document convertToDocument (String html , PdfWriter pdfWriter , ConverterProperties converterProperties ) {
302
295
return convertToDocument (html , new PdfDocument (pdfWriter ), converterProperties );
303
296
}
304
297
@@ -326,9 +319,8 @@ public static Document convertToDocument(InputStream htmlStream, PdfWriter pdfWr
326
319
* @param pdfDocument the {@link PdfDocument} instance
327
320
* @param converterProperties a {@link ConverterProperties} instance
328
321
* @return a {@link Document} instance
329
- * @throws IOException Signals that an I/O exception has occurred.
330
322
*/
331
- public static Document convertToDocument (String html , PdfDocument pdfDocument , ConverterProperties converterProperties ) throws IOException {
323
+ public static Document convertToDocument (String html , PdfDocument pdfDocument , ConverterProperties converterProperties ) {
332
324
String licenseKeyClassName = "com.itextpdf.licensekey.LicenseKey" ;
333
325
String licenseKeyProductClassName = "com.itextpdf.licensekey.LicenseKeyProduct" ;
334
326
String licenseKeyFeatureClassName = "com.itextpdf.licensekey.LicenseKeyProductFeature" ;
@@ -435,9 +427,8 @@ public static Document convertToDocument(InputStream htmlStream, PdfDocument pdf
435
427
*
436
428
* @param html the html in the form of a {@link String}
437
429
* @return a list of iText building blocks
438
- * @throws IOException Signals that an I/O exception has occurred.
439
430
*/
440
- public static List <IElement > convertToElements (String html ) throws IOException {
431
+ public static List <IElement > convertToElements (String html ) {
441
432
return convertToElements (html , null );
442
433
}
443
434
@@ -461,9 +452,8 @@ public static List<IElement> convertToElements(InputStream htmlStream) throws IO
461
452
* @param html the html in the form of a {@link String}
462
453
* @param converterProperties a {@link ConverterProperties} instance
463
454
* @return a list of iText building blocks
464
- * @throws IOException Signals that an I/O exception has occurred.
465
455
*/
466
- public static List <IElement > convertToElements (String html , ConverterProperties converterProperties ) throws IOException {
456
+ public static List <IElement > convertToElements (String html , ConverterProperties converterProperties ) {
467
457
String licenseKeyClassName = "com.itextpdf.licensekey.LicenseKey" ;
468
458
String licenseKeyProductClassName = "com.itextpdf.licensekey.LicenseKeyProduct" ;
469
459
String licenseKeyFeatureClassName = "com.itextpdf.licensekey.LicenseKeyProductFeature" ;
0 commit comments