@chialab/pdfjs-lib 1.0.0-alpha.14 → 1.0.0-alpha.15
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 +15 -7
- package/dist/browser/index.js +3 -0
- package/dist/node/index.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
## Features
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
- Browser and Node (and Bun) optimized builds using ES modules
|
|
11
|
+
- Bundler-friendly
|
|
12
|
+
- Polyfills included
|
|
13
|
+
- Extended annotation models support
|
|
14
|
+
- SVG renderer for PDF pages
|
|
15
|
+
- Improved TextLayer extraction with structure information
|
|
16
16
|
|
|
17
17
|
## Install
|
|
18
18
|
|
|
@@ -26,4 +26,12 @@ yarn add @chialab/pdfjs-lib
|
|
|
26
26
|
|
|
27
27
|
```
|
|
28
28
|
pnpm add @chialab/pdfjs-lib
|
|
29
|
-
```
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Before building
|
|
32
|
+
|
|
33
|
+
Before building the library:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
git submodule init && git submodule update
|
|
37
|
+
```
|
package/dist/browser/index.js
CHANGED
|
@@ -25929,6 +25929,9 @@ async function createTextLayer(page, {
|
|
|
25929
25929
|
scale: 1,
|
|
25930
25930
|
angle: 0
|
|
25931
25931
|
};
|
|
25932
|
+
if (geom.hasEOL) {
|
|
25933
|
+
textDiv.text = textDiv.text.replace(/\s*$/, "\n");
|
|
25934
|
+
}
|
|
25932
25935
|
textDivs.push(textDiv);
|
|
25933
25936
|
const tx = Util.transform(transform, geom.transform);
|
|
25934
25937
|
let angle = Math.atan2(tx[1], tx[0]);
|
package/dist/node/index.js
CHANGED
|
@@ -26536,6 +26536,9 @@ async function createTextLayer(page, {
|
|
|
26536
26536
|
scale: 1,
|
|
26537
26537
|
angle: 0
|
|
26538
26538
|
};
|
|
26539
|
+
if (geom.hasEOL) {
|
|
26540
|
+
textDiv.text = textDiv.text.replace(/\s*$/, "\n");
|
|
26541
|
+
}
|
|
26539
26542
|
textDivs.push(textDiv);
|
|
26540
26543
|
const tx = Util.transform(transform, geom.transform);
|
|
26541
26544
|
let angle = Math.atan2(tx[1], tx[0]);
|
package/package.json
CHANGED