|
|
|
@@ -2,19 +2,20 @@ |
|
|
|
|
|
|
|
[](https://travis-ci.com/kalimuthu-selvaraj/file-convert) [](https://coveralls.io/github/kalimuthu-selvaraj/file-convert?branch=master) |
|
|
|
|
|
|
|
Converts `.ppt` `.pptx` `.odp` and `.key` file to `pdf or/and image(png, jpg, jpeg and etc..)` |
|
|
|
(new feature) `disableExtensionCheck` is `true` then converts any file(supported by libre office) to `pdf or/and image(any format)` |
|
|
|
|
|
|
|
`disableExtensionCheck` is `false` then converts only `.ppt` `.pptx` `.odp` and `.key` file to `pdf or/and image(png, jpg, jpeg and etc..)` |
|
|
|
|
|
|
|
## Dependencies |
|
|
|
|
|
|
|
Please install [libreoffice](https://www.libreoffice.org/), [imagemagick](https://www.imagemagick.org/script/index.php) and might required [ghostscript](https://www.ghostscript.com/) for Mac os |
|
|
|
**(Note: Please do restart your machine after installed all required software.)** |
|
|
|
|
|
|
|
###IMPORTANT |
|
|
|
Make sure you install libreoffice to the USER you launch nodejs with and that this user HAS a home directory! |
|
|
|
try to convert a file from inside that USER to properly test! |
|
|
|
in case you install directly from libreoffice website, |
|
|
|
MAKE SURE you use the ./install script that comes inside the tar.gz inside the USER! |
|
|
|
|
|
|
|
###IMPORTANT |
|
|
|
Make sure you install libreoffice to the USER you launch nodejs with and that this user HAS a home directory! |
|
|
|
try to convert a file from inside that USER to properly test! |
|
|
|
in case you install directly from libreoffice website, |
|
|
|
MAKE SURE you use the ./install script that comes inside the tar.gz inside the USER! |
|
|
|
|
|
|
|
## LibreOffice test |
|
|
|
|
|
|
|
@@ -61,6 +62,7 @@ const options = { |
|
|
|
imgExt: "jpg", // Optional and default value png |
|
|
|
reSize: 800, // Optional and default Resize is 1200 |
|
|
|
density: 120, // Optional and default density value is 120 |
|
|
|
disableExtensionCheck: true, // convert any files to pdf or/and image |
|
|
|
}; |
|
|
|
|
|
|
|
// Convert document to pdf and/or image |