cpdf -output-json in.pdf -o out.json
(Modify out.json as liked) cpdf -j out.json -o out.pdf
(Disclaimer, I wrote it.) cpdf -output-json -output-json-parse-content-streams in.pdf -o out.json
Then you can play around with the JSON, and turn it back to PDF with cpdf -j out.json -o out.pdf
No live back-and-forth though.