Skip to main content
New Participant
September 14, 2010
Answered

AcroExch.App with Adobe Reader

  • September 14, 2010
  • 3 replies
  • 106469 views

If a computer only has Adobe Reader installed, can an application running on that computer interact with a pdf document via OLE?  In particular, can an application on that computer use AcroExch.App and AcroExch.AVDoc objects?

Example code:

#import "acrobat.tlb" rename_namespace("ACROBAT"), auto_rename

ACROBAT::CAcroAppPtr app("AcroExch.App");

ACROBAT::CAcroAVDocPtr avDoc("AcroExch.AVDoc");
ACROBAT::CAcroPDDocPtr pdDoc;

avDoc->Open(TEXT("c:\\example.pdf"), TEXT(""));

pdDoc = avDoc->GetPDDoc();
pdDoc->OpenAVDoc("Title");

Currently creating app gives error: Invalid class string

Thanks!

This topic has been closed for replies.
Correct answer Bernd Alheit

> If a computer only has Adobe Reader installed, can an application  running on that computer interact with a pdf document via OLE?

No,

> In  particular, can an application on that computer use AcroExch.App and  AcroExch.AVDoc objects?

No.

3 replies

New Participant
May 21, 2015

The documentation is an overwhelming mess, anyway at the end I figured out what I need to know.

This is an example annotation saved into an FDF file:

<</C[1.0 1.0 1.0]/CL[91.8331 536.61 162.546 562.254 174.546 562.254]/Contents(COMMENT CONTENT)/CreationDate(D:20150521145021+02'00')/DA(1 0 0 rg /Helv 12 Tf)/DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#FF0000 )/F 4/IT/FreeTextCallout/LE/OpenArrow/M(D:20150521151125+02'00')/NM(4dd302eb-83fd-4cf2-b4a6-f84c096ad11a)/Page 0/RC(<?xml version="1.0"?><body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:APIVersion="Acrobat:11.0.6" xfa:spec="2.0.2"  style="font-size:12.0pt;text-align:left;color:#FF0000;font-weight:normal;font-style:norma\

l;font-family:Helvetica,sans-serif;font-stretch:normal"><p dir="ltr"><span style="font-family:Helvetica">commento</span></p></body>)/RD[82.7728 20.7243 0.5 0.5]/Rect[91.7732 534.719 283.046 571.953]/Subj(Callout)/Subtype/FreeText/T(ANNOTATION AUTHOR)/Type/Annot>>

More readable fashion:

<<

/C[1.0 1.0 1.0]

/CL[91.8331 536.61 162.546 562.254 174.546 562.254]

/Contents(COMMENT CONTENT)

/CreationDate(D:20150521145021+02'00')

/DA(1 0 0 rg /Helv 12 Tf)

/DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#FF0000 )

/F 4

/IT/FreeTextCallout

/LE/OpenArrow

/M(D:20150521151125+02'00')

/NM(4dd302eb-83fd-4cf2-b4a6-f84c096ad11a)

/Page 0

/RC(<?xml version="1.0"?><body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:APIVersion="Acrobat:11.0.6" xfa:spec="2.0.2"  style="font-size:12.0pt;text-align:left;color:#FF0000;font-weight:normal;font-style:norma\

l;font-family:Helvetica,sans-serif;font-stretch:normal"><p dir="ltr"><span style="font-family:Helvetica">COMMENT CONTENT</span></p></body>)

/RD[82.7728 20.7243 0.5 0.5]

/Rect[91.7732 534.719 283.046 571.953]

/Subj(Callout)

/Subtype

/FreeText

/T(ANNOTATION AUTHOR)

/Type

/Annot

>>

"<<" and ">>" mark start/end of annotation

/C ? (who cares? :-) )

/CL = "CaLlout annotation", i.e. "a box with an arrow"; 6 numbers after /CL are coordinates of, in order:

  • arrow end
  • curve
  • arrow start

Coordinates are relative to lower-left angle of the page.

/Contents  (obvious)

/CreationDate (obvious)

/DA Default Appearance

/DS Default Style

/F Flags  (4 = nozoom)

/IT type of annotation: FreeText, FreeTextCallout,FreeTextTypewriter

/LE Style of the arrow

/NM is the unique id of the annotation (I don't need it for exporting).

/Page (obvious)

/RC containts a RiCh text version of the comment (i.e. supporting formatting)

/RD Textbox margins

/Rect Textbox containing the comment

/T Author of the annotation

So actually all I need to extract the list of comments and where the arrows point to is:

  • Find "<<"
  • Find "/CL" and get first two numbers inside [ ]
  • Find "/Contents" and read string inside ( )
  • Find "/page" and read number after space

Data taken  from table 170 and 174 in _0_PDF32000_2008.

Bernd Alheit
Braniac
May 21, 2015

I assumed you looks for the documentation of the DDE commands of Acrobat Reader.

New Participant
May 21, 2015

Yes... if it allows exporting comments.

lrosenth
Adobe Employee
Adobe Employee
September 14, 2010

No, it cannot. Reader doesn't support COM/OLE automation.

DaktorAuthor
New Participant
September 14, 2010

Thank you for the very fast response.  One follow-up question:

Assume I buy Adobe Acrobat to develop this application and use OLE to interact with pdf documents in the application.

Will my clients need to also buy Adobe Acrobat for the application to work on their computers?  Or can I package it with my application behind the scenes?

Thanks again!

New Participant
January 4, 2012

Sid - What I had achieved using Ndde (opensource) is to make a connection from .Net code (Winform) to C++ code (Adobe Plugin). All my code does is to invoke C++ code from .Net to retrieve (read only) the contents/text of a PDF document and I did not do any EDITING.

What are you trying to achieve?

-AT


athirukk- i need to write reference text on pdf docs..with acrobat this is possible as confirmed by Irosenth....however was thinking if it is possible without spending any money...

i will look at ndde....however any direction u want me to point ..

Bernd Alheit
Bernd AlheitCorrect answer
Braniac
September 14, 2010

> If a computer only has Adobe Reader installed, can an application  running on that computer interact with a pdf document via OLE?

No,

> In  particular, can an application on that computer use AcroExch.App and  AcroExch.AVDoc objects?

No.