Fix MEOptions to 21 widget and 11 parent

This commit is contained in:
Svetlana Kulikova
2025-07-30 16:20:57 +03:00
parent 8a9277d1d8
commit df8f8636b6
9 changed files with 55 additions and 52 deletions

View File

@ -546,9 +546,6 @@ function readAnnot(reader, rec, readDoubleFunc, readDouble2Func, readStringFunc,
// User ID
if (flags & (1 << 8))
rec["AP"]["Copy"] = reader.readInt();
// MEOptions
if (flags & (1 << 9))
rec["MEOptions"] = reader.readInt();
}
function readAnnotAP(reader, AP)
{
@ -1049,6 +1046,8 @@ function readWidgetType(reader, rec, readDoubleFunc, readDouble2Func, readString
rec["font"]["AP"] = readStringFunc.call(reader);
if (flags & (1 << 20))
rec["meta"] = readStringFunc.call(reader);
if (flags & (1 << 21))
rec["MEOptions"] = reader.readInt();
// Action
let nAction = reader.readInt();
if (nAction > 0)
@ -1320,6 +1319,8 @@ CFile.prototype["getInteractiveFormsInfo"] = function()
}
if (flags & (1 << 9))
rec["maxLen"] = reader.readInt();
if (flags & (1 << 11))
rec["MEOptions"] = reader.readInt();
res["Parents"].push(rec);
}

View File

@ -278,12 +278,6 @@ void ReadAnnot(BYTE* pWidgets, int& i)
std::cout << "User ID " << std::string((char*)(pWidgets + i), nPathLength) << ", ";
i += nPathLength;
}
if (nFlags & (1 << 9))
{
nPathLength = READ_INT(pWidgets + i);
i += 4;
std::cout << "MEOptions " << nPathLength << ", ";
}
}
void ReadInteractiveForms(BYTE* pWidgets, int& i)
@ -421,6 +415,12 @@ void ReadInteractiveForms(BYTE* pWidgets, int& i)
i += 4;
std::cout << "MaxLen " << nPathLength << ", ";
}
if (nFlags & (1 << 11))
{
nPathLength = READ_INT(pWidgets + i);
i += 4;
std::cout << "MEOptions " << nPathLength << ", ";
}
std::cout << std::endl;
}
@ -587,6 +587,12 @@ void ReadInteractiveForms(BYTE* pWidgets, int& i)
std::cout << "OMetadata " << std::string((char*)(pWidgets + i), nPathLength) << ", ";
i += nPathLength;
}
if (nFlags & (1 << 21))
{
nPathLength = READ_INT(pWidgets + i);
i += 4;
std::cout << "MEOptions " << nPathLength << ", ";
}
//Action