mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Display background when printing or saving a text widget (issue #14928)
This commit is contained in:
parent
60e9065bf6
commit
60498c67e4
8 changed files with 150 additions and 90 deletions
|
@ -531,6 +531,23 @@ function recoverJsURL(str) {
|
|||
return null;
|
||||
}
|
||||
|
||||
function numberToString(value) {
|
||||
if (Number.isInteger(value)) {
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
const roundedValue = Math.round(value * 100);
|
||||
if (roundedValue % 100 === 0) {
|
||||
return (roundedValue / 100).toString();
|
||||
}
|
||||
|
||||
if (roundedValue % 10 === 0) {
|
||||
return value.toFixed(1);
|
||||
}
|
||||
|
||||
return value.toFixed(2);
|
||||
}
|
||||
|
||||
export {
|
||||
collectActions,
|
||||
DocStats,
|
||||
|
@ -542,6 +559,7 @@ export {
|
|||
isWhiteSpace,
|
||||
log2,
|
||||
MissingDataException,
|
||||
numberToString,
|
||||
ParserEOFException,
|
||||
parseXFAPath,
|
||||
readInt8,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue