Skip to content

Commit

Permalink
📝 Readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilyes-El-Majouti committed Feb 29, 2024
1 parent f16a750 commit 0883664
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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]);
})();
```
Expand All @@ -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);
});
Expand All @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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)
Expand Down
Binary file removed curriculum_vitae-converted/curriculum_vitae-0.png
Binary file not shown.
Binary file removed curriculum_vitae-converted/curriculum_vitae-1.png
Binary file not shown.
Binary file removed curriculum_vitae-converted/curriculum_vitae-2.png
Binary file not shown.
Binary file removed curriculum_vitae-converted/curriculum_vitae-3.png
Binary file not shown.
Binary file removed curriculum_vitae.png
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pdftopic",
"version": "1.0.2-alpha",
"version": "1.0.3-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",
"types": "./types/index.d.ts",
Expand Down

0 comments on commit 0883664

Please sign in to comment.