Collapse pdf layers and components into an image
I have pdf documents where each page is an image. Sometimes there is an annotation object (a Comment), a field object (a textbox), or even another smaller image on top of the main page image. I would like to collapse all of these objects and the underlying main page image into one image, per page.
Is there a way of doing this in Actions or Javascript? Or maybe even a third party python library?
There is a preflight called "flatten annotations and form fields". The name seems to suggest it is exactly what I am looking for. But after running it, the only thing that's different is that when I go to the Comment menu and click "Comment List" it says : this document has no comments. However, if I select "Edit text & images" and resize the page image by dragging the image icon on the top left corner of the screen, the page image will shrink but the original Comment objects stay put. What I really want is for those Comment objects to become part of the image and "move" with the main image when I drag and resize the image.
