@measurequick/measurequick-report-generator 1.4.57 → 1.4.58

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measurequick/measurequick-report-generator",
3
- "version": "1.4.57",
3
+ "version": "1.4.58",
4
4
  "description": "Generates PDF documents for various MeasureQuick applications.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -112,10 +112,10 @@ export async function getReport(payload) {
112
112
  if (photo.base64.includes("image/jpeg")) imageToSet = await docs[docIndex].embedJpg(util._base64ToArrayBuffer(photo.base64));
113
113
  else if (photo.base64.includes("image/png")) imageToSet = await docs[docIndex].embedPng(util._base64ToArrayBuffer(photo.base64));
114
114
  else if (photo.fileName && (photo.fileName.includes('.png') || photo.file_name.includes('.png'))) {
115
- base64.replace('data:binary/octet-stream', 'data:image/png;base64');
115
+ photo.base64 = photo.base64.replace('data:binary/octet-stream', 'data:image/png;base64');
116
116
  imageToSet = await docs[docIndex].embedPng(util._base64ToArrayBuffer(photo.base64));
117
117
  } else if (photo.fileName && (photo.fileName.includes('.jpg') || photo.file_name.includes('.jpg') || photo.fileName.includes('.jpeg') || photo.file_name.includes('.jpeg'))) {
118
- base64.replace('data:binary/octet-stream', 'data:image/jpeg;base64');
118
+ photo.base64 = photo.base64.replace('data:binary/octet-stream', 'data:image/jpeg;base64');
119
119
  imageToSet = await docs[docIndex].embedJpg(util._base64ToArrayBuffer(photo.base64));
120
120
  }
121
121
  //else imageToSet = await docs[docIndex].embedJpg(util._base64ToArrayBuffer(photo.base64));