I try to modify sth in pdf (hidden the secret message in pdf), follow the doc
const ctx = writer.getObjectsContext();
ctx.startModifiedIndirectObject(i)
// do sth
ctx.endIndirectObject()
It works perfect, but the only things is that startModifiedIndirectObject will always create new object instead replace old one in the real pdf file
It will append some new info after the end of pdf file
And if I exec 10 times, it will append 10 times these sections..... so file will big and big. And the secret message I want to changed is still in the real pdf
I try to modify sth in pdf (hidden the secret message in pdf), follow the doc
It works perfect, but the only things is that
startModifiedIndirectObject
will always create new object instead replace old one in the real pdf file It will append some new info after the end of pdf fileAnd if I exec 10 times, it will append 10 times these sections..... so file will big and big. And the secret message I want to changed is still in the real pdf
How can I optimize the real pdf file ?