Hello,
I have pdf doc with 3 text strings:
[tag]
[:tag:]
[ta:g]
And try to replace them with code:
public static byte[] ReplaceContent(byte[] content) {
ContentReplacer replacer = CreateContentReplacer();
using (var doc = new PDFDoc(content, content.Length)) {
doc.InitSecurityHandler();
We do not control the creation of the doc with “[ta:g]”, we receive the doc from another system, so we can not change the values not to include colon. And we need to replace the tag.
Is it a bug? Is it a known not documented feature? How can I replace such a tag?
P.S. I’m not able to replace the text with ElementReader and ElementWriter as “[:tag:]” actually is not a single text run, but a sequence of textruns. That is why I need ContentReplacer to work in my case.
We are using regex internally, and right now, it is only accepting 0-9,a-z,A-Z, underscore, hyphen and whitespace, in the key between the square brackets.
I see that this is not documented at this time.
We are open to adding colon as accepted text in the key, but we would have to expand our unit tests first to make sure that there are no regressions.
In the meantime, are you aware of any other characters that might be in your keys? such as & ; % $ etc.?
Thanks!
As I know, we only need colon and underscore.
Could you tell me the approximate time to fix it (week, month, 3 months, etc.) in case of “no regression”?