Página 1 de 1

AcroPDF OCX Question

Publicado: Jue Nov 10, 2011 8:35 pm
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)Â

AcroPDF OCX Question

Publicado: Mié Nov 16, 2011 10:05 am
por emeasoft
No support?
Mário Angelini

AcroPDF OCX Question

Publicado: Mié Nov 16, 2011 11:17 am
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,

AcroPDF OCX Question

Publicado: Mié Nov 16, 2011 12:45 pm
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

AcroPDF OCX Question

Publicado: Mié Nov 16, 2011 1:23 pm
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

AcroPDF OCX Question

Publicado: Jue Nov 17, 2011 5:16 pm
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

AcroPDF OCX Question

Publicado: Jue Nov 17, 2011 7:39 pm
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

AcroPDF OCX Question

Publicado: Mar Nov 22, 2011 1:58 pm
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