@@ -60,6 +60,7 @@ This file is part of the iText (R) project.
60
60
import com .itextpdf .test .annotations .type .IntegrationTest ;
61
61
import org .junit .Assert ;
62
62
import org .junit .BeforeClass ;
63
+ import org .junit .Ignore ;
63
64
import org .junit .Test ;
64
65
import org .junit .experimental .categories .Category ;
65
66
@@ -305,6 +306,32 @@ public void outOfPageBoundsTest() throws IOException, InterruptedException {
305
306
Assert .assertNull (new CompareTool ().compareByContent (outFileName , cmpFileName , destinationFolder , "diff" ));
306
307
}
307
308
309
+ @ Ignore ("1280" )
310
+ @ Test
311
+ public void tabsInParagraphTest01 () throws IOException , InterruptedException {
312
+ String outFileName = destinationFolder + "tabsInParagraphTest01.pdf" ;
313
+ String cmpFileName = sourceFolder + "cmp_tabsInParagraphTest01.pdf" ;
314
+
315
+ PdfDocument pdfDoc = new PdfDocument (new PdfWriter (outFileName ));
316
+ Document doc = new Document (pdfDoc );
317
+
318
+ float tabWidth = pdfDoc .getDefaultPageSize ().getWidth () - doc .getLeftMargin () - doc .getRightMargin ();
319
+
320
+ Paragraph p = new Paragraph ();
321
+ p
322
+ .addTabStops (
323
+ new TabStop (tabWidth , TabAlignment .RIGHT ))
324
+ .add ("There is a tab after me. And then two texts." )
325
+ .add (new Tab ())
326
+ .add ("Text1" )
327
+ .add ("Text2" );
328
+
329
+ doc .add (p );
330
+
331
+ doc .close ();
332
+ Assert .assertNull (new CompareTool ().compareByContent (outFileName , cmpFileName , destinationFolder , "diff" ));
333
+ }
334
+
308
335
private Document initDocument (String outFileName ) throws FileNotFoundException {
309
336
PdfDocument pdfDoc = new PdfDocument (new PdfWriter (outFileName ));
310
337
pdfDoc .setDefaultPageSize (PageSize .A4 .rotate ());
0 commit comments