@@ -42,6 +42,7 @@ This file is part of the iText (R) project.
42
42
*/
43
43
package com .itextpdf .svg .converter ;
44
44
45
+ import com .itextpdf .io .util .MessageFormatUtil ;
45
46
import com .itextpdf .kernel .geom .Rectangle ;
46
47
import com .itextpdf .kernel .pdf .PdfDocument ;
47
48
import com .itextpdf .kernel .pdf .PdfPage ;
@@ -284,7 +285,7 @@ public void drawOnSpecifiedPositionX() throws IOException, InterruptedException
284
285
String name = "eclipse" ;
285
286
int x = 50 ;
286
287
int y = 0 ;
287
- String destName = name + "_" + x + "_" + y ;
288
+ String destName = MessageFormatUtil . format ( "{0}_{1}_{2}" , name , x , y ) ;
288
289
FileInputStream fis = new FileInputStream (sourceFolder + name + ".svg" );
289
290
drawOnSpecifiedPositionDocument (fis , destinationFolder + destName + ".pdf" , x , y );
290
291
@@ -296,7 +297,7 @@ public void drawOnSpecifiedPositionY() throws IOException, InterruptedException
296
297
String name = "eclipse" ;
297
298
int x = 0 ;
298
299
int y = 100 ;
299
- String destName = name + "_" + x + "_" + y ;
300
+ String destName = MessageFormatUtil . format ( "{0}_{1}_{2}" , name , x , y ) ;
300
301
FileInputStream fis = new FileInputStream (sourceFolder + name + ".svg" );
301
302
drawOnSpecifiedPositionDocument (fis , destinationFolder + destName + ".pdf" , x , y );
302
303
@@ -308,7 +309,7 @@ public void drawOnSpecifiedPositionXY() throws IOException, InterruptedException
308
309
String name = "eclipse" ;
309
310
int x = 50 ;
310
311
int y = 100 ;
311
- String destName = name + "_" + x + "_" + y ;
312
+ String destName = MessageFormatUtil . format ( "{0}_{1}_{2}" , name , x , y ) ;
312
313
FileInputStream fis = new FileInputStream (sourceFolder + name + ".svg" );
313
314
drawOnSpecifiedPositionDocument (fis , destinationFolder + destName + ".pdf" , x , y );
314
315
@@ -321,7 +322,7 @@ public void drawOnSpecifiedPositionNegativeX() throws IOException, InterruptedEx
321
322
String name = "eclipse" ;
322
323
int x = -50 ;
323
324
int y = 0 ;
324
- String destName = name + "_" + x + "_" + y ;
325
+ String destName = MessageFormatUtil . format ( "{0}_{1}_{2}" , name , x , y ) ;
325
326
FileInputStream fis = new FileInputStream (sourceFolder + name + ".svg" );
326
327
drawOnSpecifiedPositionDocument (fis , destinationFolder + destName + ".pdf" , x , y );
327
328
@@ -333,7 +334,7 @@ public void drawOnSpecifiedPositionNegativeY() throws IOException, InterruptedEx
333
334
String name = "eclipse" ;
334
335
int x = 0 ;
335
336
int y = -100 ;
336
- String destName = name + "_" + x + "_" + y ;
337
+ String destName = MessageFormatUtil . format ( "{0}_{1}_{2}" , name , x , y ) ;
337
338
FileInputStream fis = new FileInputStream (sourceFolder + name + ".svg" );
338
339
drawOnSpecifiedPositionDocument (fis , destinationFolder + destName + ".pdf" , x , y );
339
340
@@ -346,7 +347,7 @@ public void drawOnSpecifiedPositionNegativeXY() throws IOException, InterruptedE
346
347
String name = "eclipse" ;
347
348
int x = -50 ;
348
349
int y = -100 ;
349
- String destName = name + "_" + x + "_" + y ;
350
+ String destName = MessageFormatUtil . format ( "{0}_{1}_{2}" , name , x , y ) ;
350
351
FileInputStream fis = new FileInputStream (sourceFolder + name + ".svg" );
351
352
drawOnSpecifiedPositionDocument (fis , destinationFolder + destName + ".pdf" , x , y );
352
353
@@ -359,7 +360,7 @@ public void drawOnSpecifiedPositionPartialOnPage() throws IOException, Interrupt
359
360
String name = "eclipse" ;
360
361
int x = -50 ;
361
362
int y = -50 ;
362
- String destName = name + "_" + x + "_" + y ;
363
+ String destName = MessageFormatUtil . format ( "{0}_{1}_{2}" , name , x , y ) ;
363
364
FileInputStream fis = new FileInputStream (sourceFolder + name + ".svg" );
364
365
drawOnSpecifiedPositionDocument (fis , destinationFolder + destName + ".pdf" , x , y );
365
366
0 commit comments