pdfmake 0.2.12 → 0.2.13
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/.idea/codeStyles/Project.xml +7 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/pdfmake.iml +11 -0
- package/.idea/vcs.xml +6 -0
- package/CHANGELOG.md +12 -0
- package/build/pdfmake.js +1040 -936
- package/build/pdfmake.js.map +1 -1
- package/build/pdfmake.min.js +2 -2
- package/build/pdfmake.min.js.map +1 -1
- package/build/vfs_fonts.js +4 -4
- package/package.json +2 -2
- package/src/browser-extensions/URLBrowserResolver.js +2 -2
- package/src/browser-extensions/pdfMake.js +6 -6
- package/src/browser-extensions/virtual-fs.js +1 -1
- package/src/docPreprocessor.js +1 -1
- package/src/documentContext.js +29 -7
- package/src/elementWriter.js +16 -5
- package/src/fontProvider.js +2 -2
- package/src/helpers.js +1 -1
- package/src/imageMeasure.js +55 -55
- package/src/layoutBuilder.js +989 -857
- package/src/printer.js +1 -1
- package/src/tableProcessor.js +4 -2
- package/src/textTools.js +2 -2
package/src/printer.js
CHANGED
|
@@ -125,7 +125,7 @@ PdfPrinter.prototype.createPdfKitDocument = function (docDefinition, options) {
|
|
|
125
125
|
userPassword: docDefinition.userPassword,
|
|
126
126
|
ownerPassword: docDefinition.ownerPassword,
|
|
127
127
|
permissions: docDefinition.permissions,
|
|
128
|
-
|
|
128
|
+
lang: docDefinition.language,
|
|
129
129
|
fontLayoutCache: isBoolean(options.fontLayoutCache) ? options.fontLayoutCache : true,
|
|
130
130
|
bufferPages: options.bufferPages || false,
|
|
131
131
|
autoFirstPage: false,
|
package/src/tableProcessor.js
CHANGED
|
@@ -43,7 +43,7 @@ TableProcessor.prototype.beginTable = function (writer) {
|
|
|
43
43
|
const keepWithHeaderRows = tableNode.table.keepWithHeaderRows;
|
|
44
44
|
|
|
45
45
|
if (isPositiveInteger(keepWithHeaderRows)) {
|
|
46
|
-
|
|
46
|
+
this.rowsWithoutPageBreak += keepWithHeaderRows;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -476,7 +476,9 @@ TableProcessor.prototype.endRow = function (rowIndex, writer, pageBreaks) {
|
|
|
476
476
|
h: bgHeight,
|
|
477
477
|
lineWidth: 0,
|
|
478
478
|
color: fillColor,
|
|
479
|
-
fillOpacity: fillOpacity
|
|
479
|
+
fillOpacity: fillOpacity,
|
|
480
|
+
// mark if we are in an unbreakable block
|
|
481
|
+
_isFillColorFromUnbreakable: !!writer.transactionLevel
|
|
480
482
|
}, false, true, writer.context().backgroundLength[writer.context().page]);
|
|
481
483
|
}
|
|
482
484
|
|
package/src/textTools.js
CHANGED
|
@@ -112,7 +112,7 @@ TextTools.prototype.sizeOfRotatedText = function (text, angle, styleContextStack
|
|
|
112
112
|
width: Math.abs(size.height * Math.sin(angleRad)) + Math.abs(size.width * Math.cos(angleRad)),
|
|
113
113
|
height: Math.abs(size.width * Math.sin(angleRad)) + Math.abs(size.height * Math.cos(angleRad))
|
|
114
114
|
};
|
|
115
|
-
}
|
|
115
|
+
};
|
|
116
116
|
|
|
117
117
|
TextTools.prototype.widthOfString = function (text, font, fontSize, characterSpacing, fontFeatures) {
|
|
118
118
|
return widthOfString(text, font, fontSize, characterSpacing, fontFeatures);
|
|
@@ -320,7 +320,7 @@ function measure(fontProvider, textArray, styleContextStack) {
|
|
|
320
320
|
|
|
321
321
|
if ((sup || sub) && item.fontSize === undefined) {
|
|
322
322
|
// font size reduction taken from here: https://en.wikipedia.org/wiki/Subscript_and_superscript#Desktop_publishing
|
|
323
|
-
fontSize *= 0.58
|
|
323
|
+
fontSize *= 0.58;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
var font = fontProvider.provideFont(fontName, bold, italics);
|