Skip to main content
Skip table of contents

Alignment, indentation, leading and spacing in cells

Examples written in answer to questions such as:

centeredtextincell

JAVA

##GITHUB:https://github.com/itext/itext-publications-examples-java/blob/develop/src/main/java/com/itextpdf/samples/sandbox/tables/CenteredTextInCell.java##

C#

##GITHUB:https://github.com/itext/itext-publications-samples-dotnet/blob/develop/itext/itext.samples/itext/samples/sandbox/tables/CenteredTextInCell.cs##

indenttable

JAVA

##GITHUB:https://github.com/itext/itext-publications-examples-java/blob/develop/src/main/java/com/itextpdf/samples/sandbox/tables/IndentTable.java##

C#

##GITHUB:https://github.com/itext/itext-publications-samples-dotnet/blob/develop/itext/itext.samples/itext/samples/sandbox/tables/IndentTable.cs##

indentationincell

JAVA

##GITHUB:https://github.com/itext/itext-publications-examples-java/blob/develop/src/main/java/com/itextpdf/samples/sandbox/tables/IndentationInCell.java##

C#

##GITHUB:https://github.com/itext/itext-publications-samples-dotnet/blob/develop/itext/itext.samples/itext/samples/sandbox/tables/IndentationInCell.cs##

leadingincell

JAVA

##GITHUB:https://github.com/itext/itext-publications-examples-java/blob/develop/src/main/java/com/itextpdf/samples/sandbox/tables/LeadingInCell.java##

C#

##GITHUB:https://github.com/itext/itext-publications-samples-dotnet/blob/develop/itext/itext.samples/itext/samples/sandbox/tables/LeadingInCell.cs##

simpletable4

JAVA

##GITHUB:https://github.com/itext/itext-publications-examples-java/blob/develop/src/main/java/com/itextpdf/samples/sandbox/tables/SimpleTable4.java##

C#

##GITHUB:https://github.com/itext/itext-publications-samples-dotnet/blob/develop/itext/itext.samples/itext/samples/sandbox/tables/SimpleTable4.cs##

tablewithtab

JAVA

##GITHUB:https://github.com/itext/itext-publications-examples-java/blob/develop/src/main/java/com/itextpdf/samples/sandbox/tables/TableWithTab.java##

C#

##GITHUB:https://github.com/itext/itext-publications-samples-dotnet/blob/develop/itext/itext.samples/itext/samples/sandbox/tables/TableWithTab.cs##

Results

https://github.com/itext/itext-publications-examples-java/blob/master/cmpfiles/sandbox/tables/cmp_centered_text_in_cell.pdf
https://github.com/itext/itext-publications-examples-java/blob/master/cmpfiles/sandbox/tables/cmp_indent_table.pdf
https://github.com/itext/itext-publications-examples-java/blob/master/cmpfiles/sandbox/tables/cmp_indentation_in_cell.pdf
https://github.com/itext/itext-publications-examples-java/blob/master/cmpfiles/sandbox/tables/cmp_leading_in_cell.pdf
https://github.com/itext/itext-publications-examples-java/blob/master/cmpfiles/sandbox/tables/cmp_simple_table4.pdf
https://github.com/itext/itext-publications-examples-java/blob/master/cmpfiles/sandbox/tables/cmp_table_with_tab.pdf

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.