-
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
f16a750
commit 0883664
Showing
7 changed files
with
10 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ The `pdftopic` package offers an advanced solution for converting PDF files into | |
Follow [this](docs/dependencies-installation.md) guide to install the required dependencies. | ||
|
||
## Installation | ||
|
||
s | ||
```bash | ||
npm install --save pdftopic | ||
``` | ||
|
@@ -44,7 +44,7 @@ import fs from "fs"; | |
(async () => { | ||
const curriculum_vitae = fs.readFileSync('./pdf_files/curriculum_vitae.pdf'); | ||
|
||
const converted_result = await pdftopic.pdftobuffer(pdf, 0); | ||
const converted_result = await pdftopic.pdftobuffer(curriculum_vitae, 0); | ||
fs.writeFileSync(`./png_files/curriculum_vitae.png`, converted_result[0]); | ||
})(); | ||
``` | ||
|
@@ -58,7 +58,7 @@ import fs from "fs"; | |
(async () => { | ||
const curriculum_vitae = fs.readFileSync('./pdf_files/curriculum_vitae.pdf'); | ||
|
||
const converted_result = await pdftopic.pdftobuffer(pdf, [ 1, 3 ]); | ||
const converted_result = await pdftopic.pdftobuffer(curriculum_vitae, [ 1, 3 ]); | ||
converted_result.forEach((file, index) => { | ||
fs.writeFileSync(`./curriculum_vitae-${index}.png`, file); | ||
}); | ||
|
@@ -74,7 +74,7 @@ import fs from "fs"; | |
(async () => { | ||
const curriculum_vitae = fs.readFileSync('./pdf_files/curriculum_vitae.pdf'); | ||
|
||
const converted_result = await pdftopic.pdftobuffer(pdf, "all"); | ||
const converted_result = await pdftopic.pdftobuffer(curriculum_vitae, "all"); | ||
|
||
converted_result.forEach((file, index) => { | ||
fs.writeFileSync(`./png_files/curriculum_vitae-${index}.png`, file); | ||
|
@@ -91,7 +91,7 @@ import fs from "fs"; | |
(async () => { | ||
const curriculum_vitae = fs.readFileSync('./pdf_files/curriculum_vitae.pdf'); | ||
|
||
const converted_result = await pdftopic.pdftobuffer(pdf, "all"); | ||
const converted_result = await pdftopic.pdftobuffer(curriculum_vitae, "all"); | ||
const concat_converted_result = await pdftopic.bufferstoappend(allfiles); | ||
|
||
fs.writeFileSync(`./png_files/curriculum_vitae-big.png`, concat_converted_result); | ||
|
@@ -186,6 +186,10 @@ getDimmentions(buffers) | |
|
||
## New updates | ||
|
||
### `[ADDITION]` TypeScript Support Added | ||
|
||
In line with the latest update, version `[email protected]` now includes TypeScript support. This addition enables developers to harness the benefits of TypeScript within their projects, enhancing code quality, readability, and maintainability. With TypeScript support, users can leverage static typing, improved code intelligence, and a more robust development experience. | ||
|
||
### `[UPDATE]` Simple file conversion | ||
|
||
![Comparison between old and new versions](./docs/images/single_file.png) | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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