mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-28 23:28:16 +02:00
XFA - Fix indentation for justified paragraph
- and ceil the reserve for a caption to avoid to split it; - both issues are present in the pdf in issue #13633.
This commit is contained in:
parent
d80651e572
commit
9b5574d3ef
4 changed files with 14 additions and 7 deletions
|
@ -445,12 +445,10 @@ function fixTextIndent(styles) {
|
|||
}
|
||||
|
||||
// If indent is negative then it's a hanging indent.
|
||||
const align = styles.textAlign || "left";
|
||||
if (align === "left" || align === "right") {
|
||||
const name = "padding" + (align === "left" ? "Left" : "Right");
|
||||
const padding = getMeasurement(styles[name], "0px");
|
||||
styles[name] = `${padding - indent}px`;
|
||||
}
|
||||
const align = styles.textAlign === "right" ? "right" : "left";
|
||||
const name = "padding" + (align === "left" ? "Left" : "Right");
|
||||
const padding = getMeasurement(styles[name], "0px");
|
||||
styles[name] = `${padding - indent}px`;
|
||||
}
|
||||
|
||||
function setAccess(node, classNames) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue