Преглед на файлове

Test files changed and updated readme.

tags/v1.0.0
Kalimuthu Selvaraj преди 5 години
родител
ревизия
bc8ae47974
променени са 7 файла, в които са добавени 7 реда и са изтрити 7 реда
  1. 1
    1
      README.md
  2. 3
    3
      convert.js
  3. Двоични данни
      test/source/Metro_Style.pdf
  4. Двоични данни
      test/source/Metro_Style.pptx
  5. Двоични данни
      test/source/file_example_PPT_250kB.pdf
  6. Двоични данни
      test/source/file_example_PPT_250kB.ppt
  7. 3
    3
      test/test.js

+ 1
- 1
README.md Целия файл

@@ -60,7 +60,7 @@ const options = {
document
.convert(options)
.then((res) => {
console.log("Res1", res);
console.log("res", res); // Success or Error
})
.catch((e) => {
console.log("e", e);

+ 3
- 3
convert.js Целия файл

@@ -41,9 +41,9 @@ function run(libreOfficeBin, cmd, convert) {

const proc = spawn(_cmd, _args);

proc.stdout.on("data", (data) => {
// console.log("stdout", data.toString());
});
// proc.stdout.on("data", (data) => {
// // console.log("stdout", data.toString());
// });

proc.stderr.on("error", function (err) {
reject(err);

Двоични данни
test/source/Metro_Style.pdf Целия файл


Двоични данни
test/source/Metro_Style.pptx Целия файл


Двоични данни
test/source/file_example_PPT_250kB.pdf Целия файл


Двоични данни
test/source/file_example_PPT_250kB.ppt Целия файл


+ 3
- 3
test/test.js Целия файл

@@ -8,7 +8,7 @@ global.appRoot = path.resolve(__dirname);
describe("Convert files to pdf or/and image", function () {
const options = {
libreofficeBin: "C:\\Program Files\\LibreOffice\\program\\sooffice.exe",
sourceFile: `${global.appRoot}/source/Metro_Style.pptx`,
sourceFile: `${global.appRoot}/source/file_example_PPT_250kB.ppt`,
outputDir: `${global.appRoot}/files/`,
img: true,
};
@@ -29,7 +29,7 @@ describe("Convert files to pdf or/and image", function () {
});

it("should convert pdf to image", function () {
options.sourceFile = `${global.appRoot}/source/Metro_Style.pdf`;
options.sourceFile = `${global.appRoot}/source/file_example_PPT_250kB.pdf`;
options.outputDir = `${global.appRoot}/files/`;
options.reSize = 800;
document.convert(options).then((res) => {
@@ -38,7 +38,7 @@ describe("Convert files to pdf or/and image", function () {
});

it("should convert pdf only", function (done) {
options.sourceFile = `${global.appRoot}/source/Metro_Style.pptx`;
options.sourceFile = `${global.appRoot}/source/file_example_PPT_250kB.ppt`;
options.img = false;
document.convert(options).then((res) => {
expect(res).to.equal("Success");

Loading…
Отказ
Запис