-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2e89c2
commit 06b5327
Showing
4 changed files
with
46 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,6 @@ | ||
const exp = require("constants"); | ||
const pdftopic = require("./"); | ||
const fs = require("fs"); | ||
|
||
/*test('converting [email protected] (single file)', async () => { | ||
const pdf = fs.readFileSync('./pdf_files/ilyes.pdf'); | ||
const result = await pdftobuffer(pdf, 0); | ||
expect(result).not.toBeNull(); | ||
}); | ||
test('converting [email protected] (multiple file)', async () => { | ||
const pdf = fs.readFileSync('./pdf_files/curriculum_vitae.pdf'); | ||
var results = []; | ||
for (let index = 0; index < 4; index++) { | ||
const result = await pdftobuffer(pdf, index); | ||
results.push(result); | ||
} | ||
expect(results).not.toBeNull(); | ||
});*/ | ||
|
||
/*test('converting [email protected] (single file)', async () => { | ||
test('converting [email protected] (single file)', async () => { | ||
const pdf = fs.readFileSync('./pdf_files/ilyes.pdf'); | ||
const result = await pdftopic.pdftobuffer(pdf, 0); | ||
expect(result).not.toBeNull(); | ||
|
@@ -34,7 +16,7 @@ test('converting [email protected] (multiple file)', async () => { | |
const pdf = fs.readFileSync('./pdf_files/curriculum_vitae.pdf'); | ||
const result = await pdftopic.pdftobuffer(pdf, "all"); | ||
expect(result).not.toBeNull(); | ||
});*/ | ||
}); | ||
|
||
test('converting [email protected] (all images in one image)', async () => { | ||
const file1 = fs.readFileSync('./curriculum_vitae-converted/curriculum_vitae-0.png'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
{ | ||
"name": "pdftopic", | ||
"version": "1.0.0-alpha", | ||
"version": "1.0.1-alpha", | ||
"description": "Built for Node.js, this package empowers users to effortlessly convert PDF files into images of exceptional quality, supporting multiple formats including PNG, JPG, GIF, and others. Its streamlined functionality ensures a smooth and reliable conversion process, providing users with the flexibility to obtain top-notch images from their PDF documents", | ||
"main": "index.js", | ||
"funding":{ | ||
"type": "paypal", | ||
"url": "https://www.paypal.me/IlyesElMajouti" | ||
}, | ||
"scripts": { | ||
"test": "jest" | ||
}, | ||
|
@@ -48,7 +52,7 @@ | |
"graphics", | ||
"file conversion" | ||
], | ||
"author": "Ilyes-El-Majouti", | ||
"author": "Ilyes-El-Majouti <[email protected]>", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/Ilyes-El-Majouti/pdftopic/issues" | ||
|
@@ -61,7 +65,6 @@ | |
"pdf-lib": "^1.17.1", | ||
"progress": "^2.0.3", | ||
"sharp": "^0.32.6", | ||
"stream": "^0.0.2", | ||
"stream-to-array": "^2.3.0" | ||
}, | ||
"devDependencies": { | ||
|