unpdf 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/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -145,7 +145,7 @@ async function extractImages$1(data, pageNumber) {
|
|
|
145
145
|
continue;
|
|
146
146
|
}
|
|
147
147
|
const imageKey = operatorList.argsArray[i][0];
|
|
148
|
-
const image = imageKey.startsWith("g_") ? await page.commonObjs.get(imageKey) : await page.objs.get(imageKey);
|
|
148
|
+
const image = imageKey.startsWith("g_") ? await new Promise((resolve) => page.commonObjs.get(imageKey, (resolvedImage) => resolve(resolvedImage))) : await new Promise((resolve) => page.objs.get(imageKey, (resolvedImage) => resolve(resolvedImage)));
|
|
149
149
|
if (!image || !image.data || !image.width || !image.height) {
|
|
150
150
|
continue;
|
|
151
151
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -143,7 +143,7 @@ async function extractImages$1(data, pageNumber) {
|
|
|
143
143
|
continue;
|
|
144
144
|
}
|
|
145
145
|
const imageKey = operatorList.argsArray[i][0];
|
|
146
|
-
const image = imageKey.startsWith("g_") ? await page.commonObjs.get(imageKey) : await page.objs.get(imageKey);
|
|
146
|
+
const image = imageKey.startsWith("g_") ? await new Promise((resolve) => page.commonObjs.get(imageKey, (resolvedImage) => resolve(resolvedImage))) : await new Promise((resolve) => page.objs.get(imageKey, (resolvedImage) => resolve(resolvedImage)));
|
|
147
147
|
if (!image || !image.data || !image.width || !image.height) {
|
|
148
148
|
continue;
|
|
149
149
|
}
|
package/package.json
CHANGED