• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Creating AVGrafSelect via python and com

New Here ,
Sep 13, 2021 Sep 13, 2021

Copy link to clipboard

Copied

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?

TOPICS
Windows

Views

48

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 14, 2021 Sep 14, 2021

May be that the use of this is only possible in a plugin.

Likes

Translate

Translate
LEGEND ,
Sep 14, 2021 Sep 14, 2021

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 14, 2021 Sep 14, 2021

Copy link to clipboard

Copied

By "select a rectangular area" I mean like this:

Screenshot (1).png

The cursor for doing it is a standard arrow-shaped cursor with a rectangle to the bottom right.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 14, 2021 Sep 14, 2021

Copy link to clipboard

Copied

May be that the use of this is only possible in a plugin.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 14, 2021 Sep 14, 2021

Copy link to clipboard

Copied

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++.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 14, 2021 Sep 14, 2021

Copy link to clipboard

Copied

LATEST

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.)

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines