Latest update to Adobe Reader causes ActiveX errors in LANSA applications

Date:26 May 2014
Product/Release:Visual LANSA and Visual LANSA Frameworks - All versions
Abstract:Automatic Adobe Reader update (11.0.7) introduces problems using the Adobe ActiveX in LANSA applications
Submitted By:LANSA Technical Support

Description:

A problem has been brought to LANSA's attention by our Visual LANSA and VLF users regarding the latest release of Adobe Reader for Windows (v11.0.07). This version introduces a new ActiveX registration technique, which is not supported by current versions of LANSA (or various other programming languages). Visual LANSA/VLF Programs that use the Adobe Reader ActiveX will fail with ActiveX registration errors after users upgrade to this version of the Reader.

We are currently investigating what can be done from a LANSA perspective to assist our LANSA customers with the impact of this Adobe change.

Solution:

If you are using the Adobe Reader ActiveX for PDF viewing, and your users report problems after upgrading, you can

  • ask the users to downgrade to the last known working version (v11.0.06), and disable automatic updates
  • or you can switch to using the Web Browser ActiveX as shown in the sample form below.

The form is hardcoded to look for a sample LongRange pdf in the Temp folder for the purposes of the sample form. Alternatively, change this code to use your chosen location and PDF file.

Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(627) Clientwidth(841) Height(665) Layoutmanager(#ATLM_1) Left(692) Top(243) Width(857)
Define_Com Class(#PRIM_ATLM) Name(#ATLM_1)
Define_Com Class(#PRIM_PANL) Name(#PANL_1) Displayposition(1) Left(0) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(0) Width(841)
Define_Com Class(#PRIM_ATLI) Name(#ATLI_1) Attachment(Top) Manage(#PANL_1) Parent(#ATLM_1)
Define_Com Class(#PRIM_PANL) Name(#PANL_2) Displayposition(2) Height(577) Layoutmanager(#ATLM_2) Left(0) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(50) Width(841)
Define_Com Class(#PRIM_ATLI) Name(#ATLI_2) Attachment(Center) Manage(#PANL_2) Parent(#ATLM_1)
Define_Com Class(#PRIM_PHBN) Name(#LoadInForm) Caption('Load into Form') Displayposition(1) Left(32) Parent(#PANL_1) Tabposition(1) Top(8) Width(105)
Define_Com Class(#PRIM_PHBN) Name(#OpeninOwnWindow) Caption('Open in Own Window ') Displayposition(2) Left(152) Parent(#PANL_1) Tabposition(2) Top(8) Width(145)
Define_Com Class(#DF_WEBAC.WebBrowser) Name(#DF_WEBAC) Displayposition(1) Height(577) Left(0) Parent(#PANL_2) Tabposition(1) Top(0) Width(841)
Define_Com Class(#PRIM_ATLM) Name(#ATLM_2)
Define_Com Class(#PRIM_ATLI) Name(#ATLI_3) Attachment(Center) Manage(#DF_WEBAC) Parent(#ATLM_2)
Define_Com Class(#Prim_alph) Name(#PDFFileName)
Evtroutine Handling(#COM_Owner.CreateInstance)
#PDFFileName := 'C:/Temp/LongRangeRV16.pdf'
Endroutine
Evtroutine Handling(#LoadInForm.Click)
Invoke Method(#DF_WEBAC.Navigate) Url('file:///' + #PDFFileName)
Endroutine
Evtroutine Handling(#OpeninOwnWindow.Click)
Define Field(#rc) Type(*dec) Length(7) Decimals(0)
Use Builtin(system_command) With_Args(H #PDFFileName) To_Get(#rc)
Endroutine
End_Com