浏览代码

Updated javascript code prop to .readme file.

tags/v1.0.0
Kalimuthu Selvaraj 5 年前
父节点
当前提交
50d175d370
共有 1 个文件被更改,包括 18 次插入16 次删除
  1. 18
    16
      README.md

+ 18
- 16
README.md 查看文件

@@ -8,34 +8,36 @@ Please install libreoffice, imagemagick and might required ghostscript for Mac o

## Usage Example

```javascript
// Import convert module
const document = require("./convert");

// `.ppt,` `.pptx`, `.odp` and `.key` to pdf and/or image convert options
const options = {
libreofficeBin: "C:\\Program Files\\LibreOffice\\program\\soffice.exe", // This is optional if it is null it will find default installation path inn your OS
sourceFile: "C:\\convert-pdf-img\\sample.pptx",
outputDir: "C:\\convert-pdf-img\\abc",
img: true,
imgExt: "jpg",
reSize: 800,
density: 120,
libreofficeBin: "C:\\Program Files\\LibreOffice\\program\\soffice.exe", // This is optional if it is null it will find default installation path inn your OS
sourceFile: "C:\\convert-pdf-img\\sample.pptx",
outputDir: "C:\\convert-pdf-img\\abc",
img: true,
imgExt: "jpg",
reSize: 800,
density: 120,
};

// Document (`.ppt,` `.pptx`, `.odp` and `.key`) to pdf and/or image convert options

const options = {
libreofficeBin: "C:\\Program Files\\LibreOffice\\program\\soffice.exe", // This is optional if it is null it will find default installation path inn your OS
sourceFile: "C:\\convert-pdf-img\\sample.pdf",
outputDir: "C:\\convert-pdf-img\\",
img: true,
imgExt: "jpg",
reSize: 800,
density: 120,
libreofficeBin: "C:\\Program Files\\LibreOffice\\program\\soffice.exe", // This is optional if it is null it will find default installation path inn your OS
sourceFile: "C:\\convert-pdf-img\\sample.pdf",
outputDir: "C:\\convert-pdf-img\\",
img: true,
imgExt: "jpg",
reSize: 800,
density: 120,
};

// Convert document to pdf and/or image
document.convert(options, (err, res) => {
if (err) console.log(err.message);
console.log(res);
if (err) console.log(err.message);
console.log(res);
});
```

正在加载...
取消
保存