Support textfield and choice widgets for printing

This commit is contained in:
Calixte Denizet 2020-08-05 14:40:31 +02:00
parent 63e33a5895
commit 1747d259f9
7 changed files with 409 additions and 46 deletions

View file

@ -793,6 +793,12 @@ function stringToPDFString(str) {
return strBuf.join("");
}
function escapeString(str) {
// replace "(", ")" and "\" by "\(", "\)" and "\\"
// in order to write it in a PDF file.
return str.replace(/([\(\)\\])/g, "\\$1");
}
function stringToUTF8String(str) {
return decodeURIComponent(escape(str));
}
@ -927,6 +933,7 @@ export {
bytesToString,
createPromiseCapability,
createObjectURL,
escapeString,
getVerbosityLevel,
info,
isArrayBuffer,