Skip to content

Commit 605c722

Browse files
docs: clarify optional parameters for createPdf in README
1 parent 0ee9b32 commit 605c722

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ const images = ['path/to/image1.jpg'];
5757
const { filePath } = createPdf({
5858
imagePaths: images,
5959
name: 'myPdf',
60-
paperSize: 'A4',
60+
paperSize: 'A4', // optional
61+
// optional
6162
customPaperSize: {
6263
height: 300,
6364
width: 300,
@@ -76,7 +77,8 @@ const generatePdf = async () => {
7677
const { filePath } = await createPdf({
7778
imagePaths: images,
7879
name: 'myPdf',
79-
paperSize: 'A4',
80+
paperSize: 'A4', // optional
81+
// optional
8082
customPaperSize: {
8183
height: 300,
8284
width: 300,
@@ -100,6 +102,8 @@ const generatePdf = async () => {
100102
- An object containing:
101103
- filePath (string): The file path to the generated PDF document.
102104

105+
> **Note:** If neither paperSize or customPaperSize is passed then the image dimensions would be used as the paper size of the pdf.
106+
103107
## Contributing
104108

105109
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

0 commit comments

Comments
 (0)