Adding a Table in a PDF Document
Contents
[
Hide
]
Introduction
Aspose.PDF Cloud allows you to create a table in a PDF Document. Aspose.PDF Cloud provide the following API to achieve this
API Information
API | Type | Description | Swagger Link |
---|---|---|---|
/pdf/{name}/pages/{pageNumber}/tables | POST | Create a new Table on the page | PostPageTables |
Request Object Model
Please refer to our GitHub Page for the Table Requst Object Structure
Request Object JSON
[
{
"Top": 100,
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Rows": [
{
"Cells": [
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "y"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value",
"TextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
}
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "y",
"TextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
}
}
]
}
]
},
{
"Cells": [
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "y"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value",
"TextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
}
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "y",
"TextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
}
}
]
}
]
},
{
"Cells": [
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "y"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value",
"TextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
}
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "y",
"TextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
}
}
]
}
]
},
{
"Cells": [
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "y"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value",
"TextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
}
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "y"
"TextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
}
}
]
}
]
},
{
"Cells": [
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "y"
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "value",
"TextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
}
}
]
},
{
"BackgroundColor": {
"A": 255,
"R": 0,
"G": 136,
"B": 0
},
"DefaultCellTextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
},
"Paragraphs": [
{
"Text": "y",
"TextState": {
"FontSize": 11,
"Font": "Arial Bold",
"ForegroundColor": {
"A": 255,
"R": 0,
"G": 0,
"B": 255
},
"BackgroundColor": {
"A": 255,
"R": 255,
"G": 0,
"B": 0
},
"FontStyle": "Bold"
}
}
]
}
]
}
],
"DefaultCellBorder": {
"Left": {
"LineWidth": 1,
"Color": {
"A": 255,
"R": 0,
"G": 255,
"B": 0
}
},
"Right": {
"LineWidth": 1,
"Color": {
"A": 255,
"R": 0,
"G": 255,
"B": 0
}
},
"Top": {
"LineWidth": 1,
"Color": {
"A": 255,
"R": 0,
"G": 255,
"B": 0
}
},
"Bottom": {
"LineWidth": 1,
"Color": {
"A": 255,
"R": 0,
"G": 255,
"B": 0
}
},
"RoundedBorderRadius": 0
},
"ColumnWidths": " 30 30 30 30 30"
}
]
cURL Example
In the example below we use PdfWithTable.pdf to view table information.
SDK Source
The Aspose.PDF Cloud SDKs can be downloaded from the following page: Available SDKs