@legalplace/prerenderx 2.3.0 → 2.3.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 +0 -9
- package/dist/libs/FillPdfForm.js +3 -1
- package/package.json +1 -1
- package/src/libs/FillPdfForm.ts +2 -1
package/README.md
CHANGED
|
@@ -64,12 +64,3 @@ const pdfFormsDocuments = documentsIndex.filter((documentDescription) => Prerend
|
|
|
64
64
|
// Extracting outputs documents only
|
|
65
65
|
const outputDocuments = documentsIndex.filter((documentDescription) => Prerender.isOutput(documentDescription))
|
|
66
66
|
```
|
|
67
|
-
|
|
68
|
-
Variable `documents` will now contain an object containing all documents and their respective outputs
|
|
69
|
-
```
|
|
70
|
-
{
|
|
71
|
-
'main': [..., 'some output', ...],
|
|
72
|
-
'some secondary document': [..., 'some other output', ...]
|
|
73
|
-
...
|
|
74
|
-
}
|
|
75
|
-
```
|
package/dist/libs/FillPdfForm.js
CHANGED
|
@@ -41,7 +41,9 @@ var FillPdfForm = (function (_super) {
|
|
|
41
41
|
});
|
|
42
42
|
form.boxes.forEach(function (box) {
|
|
43
43
|
var id = "Page" + box.page + "[0]." + box.name;
|
|
44
|
-
|
|
44
|
+
var value = _this.getBoxValue(box);
|
|
45
|
+
if (!(value === '' && Object.prototype.hasOwnProperty.call(result.boxes, id)))
|
|
46
|
+
result.boxes[id] = value;
|
|
45
47
|
});
|
|
46
48
|
return result;
|
|
47
49
|
};
|
package/package.json
CHANGED
package/src/libs/FillPdfForm.ts
CHANGED
|
@@ -31,7 +31,8 @@ class FillPdfForm extends FillPdfFormBase {
|
|
|
31
31
|
// Filling boxes
|
|
32
32
|
form.boxes.forEach(box => {
|
|
33
33
|
const id = `Page${box.page}[0].${box.name}`
|
|
34
|
-
|
|
34
|
+
const value = this.getBoxValue(box)
|
|
35
|
+
if (!(value === '' && Object.prototype.hasOwnProperty.call(result.boxes, id))) result.boxes[id] = value
|
|
35
36
|
})
|
|
36
37
|
|
|
37
38
|
return result
|