@measurequick/measurequick-report-generator 1.0.38 → 1.0.40
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/index.js +17 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -160,7 +160,7 @@ function printFooterData(techName, profilePicture, companyLogo) {
|
|
|
160
160
|
doc.setFontType("bold");
|
|
161
161
|
doc.setFontSize(12);
|
|
162
162
|
doc.text("Customer", x, y);
|
|
163
|
-
doc.text(reportData.footerData.systemName, x + 2, y);
|
|
163
|
+
doc.text(reportData.footerData.systemName, x + 2.5, y);
|
|
164
164
|
doc.setFontType("normal");
|
|
165
165
|
doc.setFontSize(10);
|
|
166
166
|
|
|
@@ -168,7 +168,7 @@ function printFooterData(techName, profilePicture, companyLogo) {
|
|
|
168
168
|
|
|
169
169
|
for (let key in reportData.footerData) {
|
|
170
170
|
if (key == "columnBreak") {
|
|
171
|
-
x +=
|
|
171
|
+
x += 2.5;
|
|
172
172
|
y = 8 + s;
|
|
173
173
|
} else if (key.includes("subHeaderLabel")) {
|
|
174
174
|
doc.setFontType("bold");
|
|
@@ -182,15 +182,27 @@ function printFooterData(techName, profilePicture, companyLogo) {
|
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
function printPhotos(
|
|
185
|
+
function printPhotos(photoSections) {
|
|
186
186
|
doc.addPage();
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
var x = 0;
|
|
188
|
+
var y = 0;
|
|
189
|
+
var i = 0;
|
|
190
|
+
for (let photoSection in photoSections) {
|
|
191
|
+
for (let p = 0; p < photoSection.length; p++) {
|
|
192
|
+
doc.addImage(photoSection[p].base64, "PNG", x, y, 4, 4);
|
|
193
|
+
y += 4;
|
|
194
|
+
i++;
|
|
195
|
+
if (i == 2) {
|
|
196
|
+
i = 0;
|
|
197
|
+
doc.addPage();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
189
200
|
}
|
|
190
201
|
}
|
|
191
202
|
|
|
192
203
|
function printInfoPage(reportType) {
|
|
193
204
|
doc.addPage();
|
|
205
|
+
doc.setTextColor(0, 0, 0);
|
|
194
206
|
if (reportType == "cooling") {
|
|
195
207
|
doc.text(templates.coolingInfoPage.body, 1, 1);
|
|
196
208
|
} else if (reportType == "heating") {
|