Skip to content

Commit d06f60d

Browse files
Update appendTable.js
1 parent 22bd881 commit d06f60d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

UsesCases/Tables/add/appendTable.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ const configParams = {
1414
PDF_DOCUMENT_NAME: "sample.pdf",
1515
LOCAL_RESULT_DOCUMENT_NAME: "output_sample.pdf",
1616
PAGE_NUMBER: 2, // Your document page number...
17+
TABLE_ROWS: 5,
18+
TABLE_COLUMNS: 5,
1719
};
1820

1921
const pdfApi = new PdfApi(credentials.id, credentials.key);
@@ -23,6 +25,7 @@ const pdfTables = {
2325
const fileNamePath = path.join(configParams.LOCAL_FOLDER, configParams.PDF_DOCUMENT_NAME);
2426
const pdfFileData = await fs.readFile(fileNamePath);
2527
await pdfApi.uploadFile(configParams.PDF_DOCUMENT_NAME, pdfFileData);
28+
console.log("File '" + configParams.PDF_DOCUMENT_NAME + "' successfully uploaded!");
2629
},
2730

2831
async downloadResult () {
@@ -33,8 +36,8 @@ const pdfTables = {
3336
},
3437

3538
initTable () {
36-
const numOfCols = 5;
37-
const numOfRows = 5;
39+
const numOfCols = configParams.TABLE_COLUMNS;
40+
const numOfRows = configParams.TABLE_ROWS;
3841

3942
const headerTextState = {
4043
font: "Arial Bold",

0 commit comments

Comments
 (0)