-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.d.ts
More file actions
84 lines (81 loc) · 2.75 KB
/
index.d.ts
File metadata and controls
84 lines (81 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
declare const DOCX2PDFConverter: {
/**
* Converts a DOCX file to PDF.
*
* @param inputFilePath - Path to the input DOCX file.
* @param outputFilePath - Path to save the output PDF file.
* @param keepActive - Optional Flag to keep the application active (platform-dependent).
*/
convert(
inputFilePath: string,
outputFilePath: string,
keepActive?: boolean
): string | undefined;
/**
* Extracts images from a DOCX file and saves them to the specified directory.
*
* @param inputPath - Path to the input DOCX file.
* @param outputDir - Directory where the extracted images will be saved.
* @returns {Promise<boolean>}
*/
extractImages(inputPath: string, outputDir: string): Promise<boolean>;
/**
* Resolves and validates input and output paths, ensuring they are correct and handle both single files and directories.
*
* @param inputPath - Path to the input DOCX file or directory.
* @param outputDir - Path to the output directory or file.
*/
resolvePaths(
inputPath: string,
outputPath: string
): Promise<{ input: string; output: string; batch: boolean }>;
/**
* Convert Word document to PDF on Windows using PowerShell
*
* @param inputFilePath - Path to the input DOCX file.
* @param outputFilePath - Path to save the output PDF file.
* @param keepActive - Optional Flag to keep the application active (platform-dependent).
*/
windows(
inputFilePath: string,
outputFilePath: string,
keepActive?: boolean
): string | undefined;
/**
* New PDF to DOCX conversion functions for Windows hell yeahhh
*
* @param inputFilePath - Path to the input DOCX file.
* @param outputFilePath - Path to save the output PDF file.
* @param keepActive - Optional Flag to keep the application active (platform-dependent).
*/
windowsPdfToDocx(
inputFilePath: string,
outputFilePath: string,
keepActive?: boolean
): string | undefined;
/**
* Convert Word document to PDF on macOS using a shell script
*
* @param inputFilePath - Path to the input DOCX file.
* @param outputFilePath - Path to save the output PDF file.
* @param keepActive - Optional Flag to keep the application active (platform-dependent).
*/
macos(
inputFilePath: string,
outputFilePath: string,
keepActive?: boolean
): string | undefined;
/**
* Convert Word document to PDF Linux specific function
*
* @param inputFilePath - Path to the input DOCX file.
* @param outputFilePath - Path to save the output PDF file.
* @param keepActive - Optional Flag to keep the application active (platform-dependent).
*/
linux(
inputFilePath: string,
outputFilePath: string,
keepActive?: boolean
): string | undefined;
};
export default DOCX2PDFConverter;