In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

AcroPDF OCX Question

Xailer professional forum in English
Responder
Avatar de Usuario
emeasoft
Mensajes: 1094
Registrado: Mié Abr 01, 2009 4:12 pm
Ubicación: emeasoft
Contactar:

AcroPDF OCX Question

Mensaje por emeasoft »

Hello Xailers,
I'm trying to make acroPDF works, but I can't get it done,
Seems that it is not being loaded correctly, the bevel stays all dashed.
I imported the activex using the assistant, created and initialized the object, but it did not work.
There is an example of the problem on the annex.
Thanks in advance,
Juliano

Attached files AcroPDF Example.zip (98.8 KB)Â
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9447
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

AcroPDF OCX Question

Mensaje por ignacio »

emeasoft escribió el jue, 10 noviembre 2011 20:35Hello Xailers,
I'm trying to make acroPDF works, but I can't get it done,
Seems that it is not being loaded correctly, the bevel stays all dashed.
I imported the activex using the assistant, created and initialized the object, but it did not work.
There is an example of the problem on the annex.
Thanks in advance,
Juliano
Juliano,
I believe that control only works when is executed inside IExplorer. You can check with the function IsOcxInstaled() that it returns false (at least in my PC).
Regards,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
emeasoft
Mensajes: 1094
Registrado: Mié Abr 01, 2009 4:12 pm
Ubicación: emeasoft
Contactar:

AcroPDF OCX Question

Mensaje por emeasoft »

Hello Ignacio,
So when I check with the function IsOcxInstalled(), it always returns false, regardless the ocx I test, but when I run this test, it returns the ocx installed on my pc (AcroPDF.PDF.1):
IF IsActivex( "PDF.PdfCtrl.1" ); MyProgID := "PDF.PdfCtrl.1"; ENDIF
IF IsActivex( "PDF.PdfCtrl.2" ); MyProgID := "PDF.PdfCtrl.2"; ENDIF
IF IsActivex( "PDF.PdfCtrl.3" ); MyProgID := "PDF.PdfCtrl.3"; ENDIF
IF IsActivex( "PDF.PdfCtrl.4" ); MyProgID := "PDF.PdfCtrl.4"; ENDIF
IF IsActivex( "PDF.PdfCtrl.5" ); MyProgID := "PDF.PdfCtrl.5"; ENDIF
IF IsActivex( "PDF.PdfCtrl.6" ); MyProgID := "PDF.PdfCtrl.6"; ENDIF
IF IsActivex( "PDF.PdfCtrl.7" ); MyProgID := "PDF.PdfCtrl.7"; ENDIF
IF IsActivex( "AcroPDF.PDF.1" ); MyProgID := "AcroPDF.PDF.1"; ENDIF
IF IsActivex( "AcroPDF.PDF.2" ); MyProgID := "AcroPDF.PDF.2"; ENDIF
IF !Empty( MyProgID )
MSGINFO( MyProgID+" Installed")
ELSE
MSGINFO( 'No PDF Activex installed, please install Adobe Reader and try again.' )
RETURN .F.
ENDIF
//-------------------------------------
FUNCTION IsActivex(cACTIVEX)
LOCAL oOCX,e
TRY
oOCX := GetActiveObject( cACTIVEX )
CATCH e
TRY
oOCX := CreateObject( cACTIVEX )
CATCH e
RETURN .F.
END
END
RETURN .T.
Remembering that you need to have acrobat reader installed on your pc.
I'm able to load it on a TWebBrowser windows, but I cant control it, eg.: I cant control the zoom, disable toolbar, change property. Is there any way I can do that through the webbrowser?
Thanks,
Juliano
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

AcroPDF OCX Question

Mensaje por jfgimenez »

Juliano,
> So when I check with the function IsOcxInstalled(), it
> always returns false, regardless the ocx I test, but when I
> run this test, it returns the ocx installed on my pc
> (AcroPDF.PDF.1):
>
> IF IsActivex( "PDF.PdfCtrl.1" ); MyProgID :=
> "PDF.PdfCtrl.1"; ENDIF
> IF IsActivex( "PDF.PdfCtrl.2" ); MyProgID :=
> "PDF.PdfCtrl.2"; ENDIF
> IF IsActivex( "PDF.PdfCtrl.3" ); MyProgID :=
> "PDF.PdfCtrl.3"; ENDIF
> IF IsActivex( "PDF.PdfCtrl.4" ); MyProgID :=
> "PDF.PdfCtrl.4"; ENDIF
> IF IsActivex( "PDF.PdfCtrl.5" ); MyProgID :=
> "PDF.PdfCtrl.5"; ENDIF
> IF IsActivex( "PDF.PdfCtrl.6" ); MyProgID :=
> "PDF.PdfCtrl.6"; ENDIF
> IF IsActivex( "PDF.PdfCtrl.7" ); MyProgID :=
> "PDF.PdfCtrl.7"; ENDIF
> IF IsActivex( "AcroPDF.PDF.1" ); MyProgID :=
> "AcroPDF.PDF.1"; ENDIF
> IF IsActivex( "AcroPDF.PDF.2" ); MyProgID :=
> "AcroPDF.PDF.2"; ENDIF
> IF !Empty( MyProgID )
> MSGINFO( MyProgID+" Installed")
> ELSE
> MSGINFO( 'No PDF Activex installed, please install Adobe
> Reader and try again.' )
> RETURN .F. ENDIF
>
> //-------------------------------------
>
> FUNCTION IsActivex(cACTIVEX)
> LOCAL oOCX,e
> TRY
> oOCX := GetActiveObject( cACTIVEX )
> CATCH e
> TRY
> oOCX := CreateObject( cACTIVEX )
> CATCH e
> RETURN .F. END
> END
> RETURN .T.
> Remembering that you need to have acrobat reader installed
> on your pc.
>
> I'm able to load it on a TWebBrowser windows, but I cant
> control it, eg.: I cant control the zoom, disable toolbar,
> change property. Is there any way I can do that through the
> webbrowser?
It's because in ActiveX() you are testing for the existence of ActiveX
*components* (OLE automation servers), while IsOcxInstalled() search for
ActiveX *controls* (OCX). Both are different things.
It seem that "AcroPDF.PDF.1" is an ActiveX component, but not an OCX.
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
emeasoft
Mensajes: 1094
Registrado: Mié Abr 01, 2009 4:12 pm
Ubicación: emeasoft
Contactar:

AcroPDF OCX Question

Mensaje por emeasoft »


Thats true Jose,
Then I started searching again and found this topic http://www.xailer.com/forum/index.php?t=msg&goto=10705
I downloaded the examples and now I'm adapting it and testing to see if it works.
Xailer does not have a class to interact with activex, does it?
Thanks for the help,
Juliano
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

AcroPDF OCX Question

Mensaje por jfgimenez »

Juliano,
> Thats true Jose,
> Then I started searching again and found this topic
> http://www.xailer.com/forum/index.php?t=msg&goto=10705
>
> I downloaded the examples and now I'm adapting it and
> testing to see if it works.
>
> Xailer does not have a class to interact with activex, does
> it?
Yes, it does. Or better said, xHarbour has the TOleAuto class to deal
with activex components (OLE automation servers). You may use it by
calling its constructor directly ( TOleAuto():New( <cClsID> ) ) or by
calling CreateObject() and/or GetActiveObject() as in your previous message.
What Xailer supports by its own are ActiveX controls, or OCX. It's just
what you are doing in your other message thread ("WebBrowse SetFocus
Question").
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
emeasoft
Mensajes: 1094
Registrado: Mié Abr 01, 2009 4:12 pm
Ubicación: emeasoft
Contactar:

AcroPDF OCX Question

Mensaje por emeasoft »

Hello Jose,
Thanks for all the help, I made acropdf works, but it has a bug that gives an violation access error when you press tab...
Now We are using the outsideX ocx, that works very well for our purpose.
Regards,
Juliano
Responder