I'm trying to select a rectangular area of a page via python, but I can't manage to do it. From what I've read, a rectangular selection is an AVGrafSelect object, but the command
selection = Dispatch("AcroExch.AVGrafSelect")
is resulting in the error message 'Invalid class string'. What am I doing wrong? How do I make an AVGrafSelect object?
What specific product is installed? Acrobat Pro, Acrobat Standard, Acrobat Reader, Adobe Reader, other?
What specific version is installed?
And: Please give documentation link for AVGrafSelect. I do not see it in the Acrobat developer info. Indeed, what would "select a rectangular area" even mean? Perhaps the bigger picture will be helpful.
By "select a rectangular area" I mean like this:
The cursor for doing it is a standard arrow-shaped cursor with a rectangle to the bottom right.
May be that the use of this is only possible in a plugin.
You are right Bernd, I missed that. You cannot mix and match the different APIs. The plug-in API is only accessible to plug-ins (not external apps) and plug-ins can only be written in C++.
Thanks for explaining. If I can't create an AVGrafSelect object from an external program, is there another way I can select a rectangular area?
(what I actually want to do is copy a rectangular area, but I want to copy it in the form that selecting and copying it gives, not as an image like CopyToClipboard does, so I was wanting to select a rectangular area and use MenuItemExecute to copy it.)