At my job we regularly unlock the fields of pdf files in order to edit them using this sed script in a .bat file:type %1 | sed -E 's/(.*\/T\([a-zA-Z0-9]*\).*)\/Ff 1(\/?.*)/\1\/Ff 0\2/' |  sed      -E 's/(.*\/T\([a-zA-Z0-9]*\).*)\/Ff 4097(\/?.*)/\1\/Ff 4096\2/'>%~n1.UNLOCKED%~x1But now it doesn't work and we have been working on it for 4 days now and are completely stumped. Unfortunately, the guy who wrote it no longer works here and did not leave good documentation. Any help would be greatly appreciated.
Using sed to unlock fields in a pdf
sed