Skip to content

Commit f96a661

Browse files
Update appendTextHeader.js
1 parent 9521256 commit f96a661

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

UsesCases/HeaderFooter/appendTextHeader.js

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@
88
// 8. Perform some action after successful addition
99
// All values of variables starting with "YOUR_****" should be replaced by real user values
1010

11-
import credentials from "../../../Credentials/credentials.json" with { type: "json" };
11+
import credentials from "./credentials.json" with { type: "json" };
1212
import fs from 'node:fs/promises';
1313
import path from 'node:path';
14-
import { PdfApi } from "../../src/api/api.js";
15-
import { TextHeader } from "../../src/models/textHeader.js";
16-
import { TextFooter } from "../../src/models/textFooter.js";
17-
18-
import { HorizontalAlignment } from "../../src/models/horizontalAlignment.js";
14+
import { PdfApi } from "asposepdfcloud";
15+
import { TextHeader } from "asposepdfcloud/src/models/textHeader.js";
16+
import { HorizontalAlignment } from "asposepdfcloud/src/models/horizontalAlignment.js";
1917

2018
const configParams = {
2119
LOCAL_FOLDER: "C:\\Samples\\",
@@ -51,15 +49,6 @@ const pdfHederFooter = {
5149

5250
await pdfApi.postDocumentTextHeader(configParams.PDF_DOCUMENT_NAME, textHeader);
5351
},
54-
55-
async adddTextFooter () {
56-
const textFooter = new TextFooter();
57-
textFooter.background = true;
58-
textFooter.value = configParams.FOOTER_VALUE;
59-
textFooter.horizontalAlignment = "Center";
60-
61-
await pdfApi.postDocumentTextFooter(configParams.PDF_DOCUMENT_NAME, textFooter);
62-
},
6352
}
6453

6554
async function main() {
@@ -72,4 +61,4 @@ async function main() {
7261
}
7362
}
7463

75-
main();
64+
main();

0 commit comments

Comments
 (0)