dompdf.js 1.0.3 → 1.0.4
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/dompdf.esm.js +10 -10
- package/dist/dompdf.esm.js.map +1 -1
- package/dist/dompdf.js +10 -10
- package/dist/dompdf.js.map +1 -1
- package/dist/lib/render/canvas/pdf-renderer.js +8 -8
- package/dist/lib/render/canvas/pdf-renderer.js.map +1 -1
- package/package.json +134 -134
package/dist/dompdf.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* dompdf.js 1.0.
|
|
2
|
+
* dompdf.js 1.0.4 <https://dompdfjs.lisky.com.cn>
|
|
3
3
|
* Copyright (c) 2025 lfc <https://dompdfjs.lisky.com.cn/>
|
|
4
4
|
* Released under MIT License
|
|
5
5
|
*/
|
|
6
|
-
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':
|
|
6
|
+
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35730/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
|
7
7
|
(function (global, factory) {
|
|
8
8
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
9
9
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -9395,8 +9395,8 @@
|
|
|
9395
9395
|
// 添加到 PDF
|
|
9396
9396
|
try {
|
|
9397
9397
|
bounds = contentBox$1(container);
|
|
9398
|
-
x = this.pxToPt(bounds.left);
|
|
9399
|
-
y = this.pxToPt(bounds.top);
|
|
9398
|
+
x = this.pxToPt(bounds.left - this.options.x);
|
|
9399
|
+
y = this.pxToPt(bounds.top - this.options.y);
|
|
9400
9400
|
width = this.pxToPt(bounds.width);
|
|
9401
9401
|
height = this.pxToPt(bounds.height);
|
|
9402
9402
|
// 将图片添加到 PDF
|
|
@@ -9418,8 +9418,8 @@
|
|
|
9418
9418
|
// 添加到 PDF
|
|
9419
9419
|
try {
|
|
9420
9420
|
bounds = contentBox$1(container);
|
|
9421
|
-
x = this.pxToPt(bounds.left);
|
|
9422
|
-
y = this.pxToPt(bounds.top);
|
|
9421
|
+
x = this.pxToPt(bounds.left - this.options.x);
|
|
9422
|
+
y = this.pxToPt(bounds.top - this.options.y);
|
|
9423
9423
|
width = this.pxToPt(bounds.width);
|
|
9424
9424
|
height = this.pxToPt(bounds.height);
|
|
9425
9425
|
dataURL = container.canvas.toDataURL('image/png', 0.95);
|
|
@@ -9442,8 +9442,8 @@
|
|
|
9442
9442
|
// 添加到 PDF
|
|
9443
9443
|
try {
|
|
9444
9444
|
bounds = contentBox$1(container);
|
|
9445
|
-
x = this.pxToPt(bounds.left);
|
|
9446
|
-
y = this.pxToPt(bounds.top);
|
|
9445
|
+
x = this.pxToPt(bounds.left - this.options.x);
|
|
9446
|
+
y = this.pxToPt(bounds.top - this.options.y);
|
|
9447
9447
|
width = this.pxToPt(bounds.width);
|
|
9448
9448
|
height = this.pxToPt(bounds.height);
|
|
9449
9449
|
canvas = document.createElement('canvas');
|
|
@@ -9875,8 +9875,8 @@
|
|
|
9875
9875
|
]), path = _b[0], x = _b[1], y = _b[2], width = _b[3], height = _b[4];
|
|
9876
9876
|
pattern = this.ctx.createPattern(this.resizeImage(image, width, height), 'repeat');
|
|
9877
9877
|
this.renderRepeat(path, pattern, x, y);
|
|
9878
|
-
xPt = this.pxToPt(x);
|
|
9879
|
-
yPt = this.pxToPt(y);
|
|
9878
|
+
xPt = this.pxToPt(x - this.options.x);
|
|
9879
|
+
yPt = this.pxToPt(y - this.options.y);
|
|
9880
9880
|
widthPt = this.pxToPt(width);
|
|
9881
9881
|
heightPt = this.pxToPt(height);
|
|
9882
9882
|
// console.log('绘制背景图片', xPt, yPt, image)
|