pdfbooklet 1.0.5 → 1.0.6
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/package.json +1 -1
- package/pdfbooklet.js +5 -1
package/package.json
CHANGED
package/pdfbooklet.js
CHANGED
|
@@ -221,8 +221,12 @@ if (!fs.existsSync(inputPdfPath)) {
|
|
|
221
221
|
// Automatically generate the output filename by appending '-booklet' before '.pdf'
|
|
222
222
|
outputPdfPath ||= inputPdfPath.replace(/\.pdf$/i, '-booklet.pdf');
|
|
223
223
|
|
|
224
|
+
if (outputPdfPath === inputPdfPath) {
|
|
225
|
+
err("Output file must not be same as input file");
|
|
226
|
+
}
|
|
227
|
+
|
|
224
228
|
// Usage example
|
|
225
229
|
createBooklet(inputPdfPath, outputPdfPath).catch(err => {
|
|
226
|
-
|
|
230
|
+
err(`Error creating booklet: ${err}`);
|
|
227
231
|
});
|
|
228
232
|
|