pdfbooklet 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ To install
2
+
3
+ ```
4
+ npm i -g pdfbooklet
5
+ ```
6
+
7
+ To use
8
+
9
+ ```
10
+ pdfbooklet <input.pdf>
11
+
12
+ OPTIONS:
13
+ --paper-size (a4|letter), default is letter
14
+ --margin-inset X reduce margin of the original pdf on all sides by X (in inches)
15
+ --margin-inset X,Y reduce margin X on top and bottom, Y on left and right
16
+ --margin-inset X,Y,Z,A reduce margin-top by X, right by Y, bottom by Z, left by A
17
+ ```
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
- "name":"pdfbooklet",
3
- "version": "1.0.0",
2
+ "name": "pdfbooklet",
3
+ "version": "1.0.1",
4
4
  "description": "Create booklet from a pdf file suitable for compact printing",
5
5
  "main": "pdfbooklet.js",
6
6
  "bin": {
7
7
  "pdfbooklet": "pdfbooklet.js"
8
8
  },
9
9
  "files": [
10
+ "README.md",
10
11
  "pdfbooklet.js"
11
12
  ],
12
13
  "scripts": {
package/pdfbooklet.js CHANGED
@@ -27,9 +27,9 @@ pdfbooklet <input.pdf>
27
27
 
28
28
  OPTIONS:
29
29
  --paper-size (a4|letter), default is letter
30
- --margin-insets X reduce margin of the original pdf on all sides by X (in inches)
31
- --margin-insets X,Y reduce margin X on top and bottom, Y on left and right
32
- --margin-insets X,Y,Z,A reduce margin-top by X, right by Y, bottom by Z, left by A
30
+ --margin-inset X reduce margin of the original pdf on all sides by X (in inches)
31
+ --margin-inset X,Y reduce margin X on top and bottom, Y on left and right
32
+ --margin-inset X,Y,Z,A reduce margin-top by X, right by Y, bottom by Z, left by A
33
33
  `)
34
34
  process.exit(msg ? 1 : 0)
35
35
  }
@@ -161,8 +161,8 @@ for (let i = 2; i < process.argv.length; i++) {
161
161
  marginInsets.bottom = insets[0];
162
162
  marginInsets.top = insets[0];
163
163
  } else if (insets.length === 2) {
164
- marginInsets.bottom = insets[0];
165
164
  marginInsets.top = insets[0];
165
+ marginInsets.bottom = insets[0];
166
166
  marginInsets.left = insets[1];
167
167
  marginInsets.right = insets[1];
168
168
  } else if (insets.length === 4) {