@@ -46,16 +46,13 @@ This file is part of the iText (R) project.
4646import com .itextpdf .html2pdf .attach .Attacher ;
4747import com .itextpdf .html2pdf .exception .Html2PdfException ;
4848import com .itextpdf .io .util .FileUtil ;
49+ import com .itextpdf .kernel .Version ;
4950import com .itextpdf .kernel .counter .event .IMetaInfo ;
5051import com .itextpdf .kernel .pdf .DocumentProperties ;
5152import com .itextpdf .kernel .pdf .PdfDocument ;
5253import com .itextpdf .kernel .pdf .PdfWriter ;
5354import com .itextpdf .layout .Document ;
5455import 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 ;
5956import com .itextpdf .styledxmlparser .IXmlParser ;
6057import com .itextpdf .styledxmlparser .node .IDocumentNode ;
6158import com .itextpdf .styledxmlparser .node .impl .jsoup .JsoupHtmlParser ;
@@ -66,6 +63,9 @@ This file is part of the iText (R) project.
6663import java .io .IOException ;
6764import java .io .InputStream ;
6865import java .io .OutputStream ;
66+ import java .lang .reflect .Array ;
67+ import java .lang .reflect .Constructor ;
68+ import java .lang .reflect .Method ;
6969import java .util .List ;
7070
7171/**
@@ -92,9 +92,8 @@ private HtmlConverter() {
9292 *
9393 * @param html the html in the form of a {@link String}
9494 * @param pdfStream the PDF as an {@link OutputStream}
95- * @throws IOException Signals that an I/O exception has occurred.
9695 */
97- public static void convertToPdf (String html , OutputStream pdfStream ) throws IOException {
96+ public static void convertToPdf (String html , OutputStream pdfStream ) {
9897 convertToPdf (html , pdfStream , null );
9998 }
10099
@@ -105,9 +104,8 @@ public static void convertToPdf(String html, OutputStream pdfStream) throws IOEx
105104 * @param html the html in the form of a {@link String}
106105 * @param pdfStream the PDF as an {@link OutputStream}
107106 * @param converterProperties a {@link ConverterProperties} instance
108- * @throws IOException Signals that an I/O exception has occurred.
109107 */
110- public static void convertToPdf (String html , OutputStream pdfStream , ConverterProperties converterProperties ) throws IOException {
108+ public static void convertToPdf (String html , OutputStream pdfStream , ConverterProperties converterProperties ) {
111109 convertToPdf (html , new PdfWriter (pdfStream ), converterProperties );
112110 }
113111
@@ -117,9 +115,8 @@ public static void convertToPdf(String html, OutputStream pdfStream, ConverterPr
117115 *
118116 * @param html the html in the form of a {@link String}
119117 * @param pdfWriter the {@link PdfWriter} instance
120- * @throws IOException Signals that an I/O exception has occurred.
121118 */
122- public static void convertToPdf (String html , PdfWriter pdfWriter ) throws IOException {
119+ public static void convertToPdf (String html , PdfWriter pdfWriter ) {
123120 convertToPdf (html , pdfWriter , null );
124121 }
125122
@@ -130,9 +127,8 @@ public static void convertToPdf(String html, PdfWriter pdfWriter) throws IOExcep
130127 * @param html the html in the form of a {@link String}
131128 * @param pdfWriter the {@link PdfWriter} instance
132129 * @param converterProperties a {@link ConverterProperties} instance
133- * @throws IOException Signals that an I/O exception has occurred.
134130 */
135- public static void convertToPdf (String html , PdfWriter pdfWriter , ConverterProperties converterProperties ) throws IOException {
131+ public static void convertToPdf (String html , PdfWriter pdfWriter , ConverterProperties converterProperties ) {
136132 convertToPdf (html , new PdfDocument (pdfWriter , new DocumentProperties ().setEventCountingMetaInfo (new HtmlMetaInfo ())), converterProperties );
137133 }
138134
@@ -143,9 +139,8 @@ public static void convertToPdf(String html, PdfWriter pdfWriter, ConverterPrope
143139 * @param html the html in the form of a {@link String}
144140 * @param pdfDocument the {@link PdfDocument} instance
145141 * @param converterProperties a {@link ConverterProperties} instance
146- * @throws IOException Signals that an I/O exception has occurred.
147142 */
148- public static void convertToPdf (String html , PdfDocument pdfDocument , ConverterProperties converterProperties ) throws IOException {
143+ public static void convertToPdf (String html , PdfDocument pdfDocument , ConverterProperties converterProperties ) {
149144 Document document = convertToDocument (html , pdfDocument , converterProperties );
150145 document .close ();
151146 }
@@ -268,9 +263,8 @@ public static void convertToPdf(InputStream htmlStream, PdfDocument pdfDocument,
268263 * @param html the html in the form of a {@link String}
269264 * @param pdfWriter the {@link PdfWriter} containing the resulting PDF
270265 * @return a {@link Document} instance
271- * @throws IOException Signals that an I/O exception has occurred.
272266 */
273- public static Document convertToDocument (String html , PdfWriter pdfWriter ) throws IOException {
267+ public static Document convertToDocument (String html , PdfWriter pdfWriter ) {
274268 return convertToDocument (html , pdfWriter , null );
275269 }
276270
@@ -296,9 +290,8 @@ public static Document convertToDocument(InputStream htmlStream, PdfWriter pdfWr
296290 * @param pdfWriter the pdf writer
297291 * @param converterProperties a {@link ConverterProperties} instance
298292 * @return a {@link Document} instance
299- * @throws IOException Signals that an I/O exception has occurred.
300293 */
301- public static Document convertToDocument (String html , PdfWriter pdfWriter , ConverterProperties converterProperties ) throws IOException {
294+ public static Document convertToDocument (String html , PdfWriter pdfWriter , ConverterProperties converterProperties ) {
302295 return convertToDocument (html , new PdfDocument (pdfWriter ), converterProperties );
303296 }
304297
@@ -326,9 +319,8 @@ public static Document convertToDocument(InputStream htmlStream, PdfWriter pdfWr
326319 * @param pdfDocument the {@link PdfDocument} instance
327320 * @param converterProperties a {@link ConverterProperties} instance
328321 * @return a {@link Document} instance
329- * @throws IOException Signals that an I/O exception has occurred.
330322 */
331- public static Document convertToDocument (String html , PdfDocument pdfDocument , ConverterProperties converterProperties ) throws IOException {
323+ public static Document convertToDocument (String html , PdfDocument pdfDocument , ConverterProperties converterProperties ) {
332324 String licenseKeyClassName = "com.itextpdf.licensekey.LicenseKey" ;
333325 String licenseKeyProductClassName = "com.itextpdf.licensekey.LicenseKeyProduct" ;
334326 String licenseKeyFeatureClassName = "com.itextpdf.licensekey.LicenseKeyProductFeature" ;
@@ -435,9 +427,8 @@ public static Document convertToDocument(InputStream htmlStream, PdfDocument pdf
435427 *
436428 * @param html the html in the form of a {@link String}
437429 * @return a list of iText building blocks
438- * @throws IOException Signals that an I/O exception has occurred.
439430 */
440- public static List <IElement > convertToElements (String html ) throws IOException {
431+ public static List <IElement > convertToElements (String html ) {
441432 return convertToElements (html , null );
442433 }
443434
@@ -461,9 +452,8 @@ public static List<IElement> convertToElements(InputStream htmlStream) throws IO
461452 * @param html the html in the form of a {@link String}
462453 * @param converterProperties a {@link ConverterProperties} instance
463454 * @return a list of iText building blocks
464- * @throws IOException Signals that an I/O exception has occurred.
465455 */
466- public static List <IElement > convertToElements (String html , ConverterProperties converterProperties ) throws IOException {
456+ public static List <IElement > convertToElements (String html , ConverterProperties converterProperties ) {
467457 String licenseKeyClassName = "com.itextpdf.licensekey.LicenseKey" ;
468458 String licenseKeyProductClassName = "com.itextpdf.licensekey.LicenseKeyProduct" ;
469459 String licenseKeyFeatureClassName = "com.itextpdf.licensekey.LicenseKeyProductFeature" ;
0 commit comments