How to programmatically get Acrobat Reader to switch to the "Read Mode (Ctrl-H)" mode

Jun 27, 2017

Copy link to clipboard

Copied

Hello.

I'm trying to use OLE Automation for Acrobat Reader in my application on VFP. There are no problems anywhere, but I came across a question that I can not find the answer to: How do I programmatically get Acrobat Reader to enter the "Read Mode (Ctrl-H)" mode?

AdobeApp = createObject ('AcroExch.App')

AdobeDoc = createObject ('AcroExch.AVDoc')

AdobeDoc.open (AdobeFileName, '')

AdobeForm = createObject ('AFormAut.App')

AdobeFields = AdobeForm.fields

AdobeApp.Show

AdobeDoc.BringToFront ()

? go into Read Mode (Ctrl-H)

Thanked in advance for help

TOPICS
Acrobat SDK and JavaScript

Views

747

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

How to programmatically get Acrobat Reader to switch to the "Read Mode (Ctrl-H)" mode

Jun 27, 2017

Copy link to clipboard

Copied

Hello.

I'm trying to use OLE Automation for Acrobat Reader in my application on VFP. There are no problems anywhere, but I came across a question that I can not find the answer to: How do I programmatically get Acrobat Reader to enter the "Read Mode (Ctrl-H)" mode?

AdobeApp = createObject ('AcroExch.App')

AdobeDoc = createObject ('AcroExch.AVDoc')

AdobeDoc.open (AdobeFileName, '')

AdobeForm = createObject ('AFormAut.App')

AdobeFields = AdobeForm.fields

AdobeApp.Show

AdobeDoc.BringToFront ()

? go into Read Mode (Ctrl-H)

Thanked in advance for help

TOPICS
Acrobat SDK and JavaScript

Views

748

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
Jun 27, 2017 0
Jun 28, 2017

Copy link to clipboard

Copied

Deployed using the JS Console Arcodat and the command app.listMenuItems ()
The result is a working code:

AdobeApp = createObject ('AcroExch.App')
AdobeDoc = createObject ('AcroExch.AVDoc')
AdobeDoc.open (AdobeFileName, '')
AdobeForm = createObject ('AFormAut.App')
AdobeFields = AdobeForm.fields

AdobeApp.Show
AdobeDoc.BringToFront ()
AdobeApp.MenuItemExecute ("ReadingMode")

Thanks to all.

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
Reply
Loading...
Jun 28, 2017 0
Adobe Community Professional ,
Jun 28, 2017

Copy link to clipboard

Copied

It will not work with Acrobat Reader.

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
Reply
Loading...
Jun 28, 2017 0
Jun 28, 2017

Copy link to clipboard

Copied

I debugged my application for two days.
AdobeApp.Show caused the launch of Acrobat Reader DC, everything was fine.
After I received a list of menu commands from the Acrobat js console, AdobeApp.Show began to call Acrobat. The default pdf-file handler is Acrobat Reader.

What could have happened?

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
Reply
Loading...
Jun 28, 2017 0
Adobe Community Professional ,
Jun 28, 2017

Copy link to clipboard

Copied

Test it on a system with Acrobat Reader only.

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
Reply
Loading...
Jun 28, 2017 0
Jun 28, 2017

Copy link to clipboard

Copied

I started it on a virtual machine where Acrobat is not installed, but Reader is present.
The application throws an error when running AdobeApp = createObject ('AcroExch.App').

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
Reply
Loading...
Jun 28, 2017 0
Adobe Employee ,
Jun 28, 2017

Copy link to clipboard

Copied

Correct – because Reader doesn’t expose that object.

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
Reply
Loading...
Jun 28, 2017 0
Adobe Community Professional ,
Jun 28, 2017

Copy link to clipboard

Copied

Did you read the documentation in the Acrobat SDK?

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
Reply
Loading...
Jun 28, 2017 0
Jun 28, 2017

Copy link to clipboard

Copied

Oh sure. And I can not understand what happened to me.

For two days I am writing a program for copying data from VPF to a prepared pdf form. When the form was opened, the Reader DC was loaded from the VPF. I wanted to slightly change the view of the Reader and for this I went to Acrobat Pro to find out the name of the menu item (View-> Read Mode Ctrl-H) in the js console. I do not understand, but after some time Acrobat Pro was downloaded instead of Reader.

I could not make a mistake, because they have different interfaces and I would have rushed to it yesterday.

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
Reply
Loading...
Jun 28, 2017 0
Jun 28, 2017

Copy link to clipboard

Copied

Sorry, but I made a mistake with Reader.
Probably overheated.

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
Reply
Loading...
Jun 28, 2017 0