I want to modify PDFs to remove certain objects (specifically black rectangles) from a page. Of the example files, the closest example I see is changepagestring.pl, which uses the getPageContent and setPageContent functions. getPageContent seems to return an unstructured string, that I'd then have to parse, interpret and modify myself.
It would be nicer if I could manipulate the data structure produced by getPageContentTree, but there doesn't appear to be a corresponding setPageContentTree function.
Is there another approach I'm missing?