Skip to content

Commit 26fcde0

Browse files
Update appendImageFooter.js
1 parent cb4529f commit 26fcde0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

UsesCases/HeaderFooter/appendImageFooter.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +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" }; // json-file in this format: { "id": "*****", "key": "*******" }
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 { ImageFooter } from "../../src/models/imageFooter.js";
14+
import { PdfApi } from "asposepdfcloud";
15+
import { ImageFooter } from "asposepdfcloud/src/models/imageFooter.js";
16+
import { HorizontalAlignment } from "asposepdfcloud/src/models/horizontalAlignment.js";
1617

1718
const configParams = {
1819
LOCAL_FOLDER: "C:\\Samples\\",
@@ -45,7 +46,7 @@ const pdfHederFooter = {
4546
const imageFooter = new ImageFooter();
4647
imageFooter.background = true;
4748
imageFooter.value = "TEST FOOTER VALUE";
48-
imageFooter.horizontalAlignment = "Center";
49+
imageFooter.horizontalAlignment = HorizontalAlignment.Center;
4950
imageFooter.fileName = configParams.IMAGE_FOOTER_FILE;
5051
imageFooter.width = 24;
5152
imageFooter.height = 24;
@@ -71,4 +72,4 @@ async function main() {
7172
}
7273
}
7374

74-
main();
75+
main();

0 commit comments

Comments
 (0)