Skip to main content

PDF OCX

Author: dammie@seznam.cz (dammie)

Hello, I am unable to show Adobe in Uniface.... I used OCX Adobe PDF Reader ( AcroPDF.PDF )... generated signatures... I tried this, but nothing appears in form... variables HANDLE lh_ocx boolean ln_b endvariables lh_ocx = $ocxhandle ( OCX.DUMMY ) lh_ocx->loadfile( ln_b, "c:\\3gl.pdf" ) Need I use something as lh_ocx->visible(), but there is no such method or set_visible method... Any hints? Thanks. David

PDF OCX

Author: dammie@seznam.cz (dammie)

Hello, I am unable to show Adobe in Uniface.... I used OCX Adobe PDF Reader ( AcroPDF.PDF )... generated signatures... I tried this, but nothing appears in form... variables HANDLE lh_ocx boolean ln_b endvariables lh_ocx = $ocxhandle ( OCX.DUMMY ) lh_ocx->loadfile( ln_b, "c:\\3gl.pdf" ) Need I use something as lh_ocx->visible(), but there is no such method or set_visible method... Any hints? Thanks. David

We use a component variable set as a public handle for the OCX rather than a variables declaration and our code is

$adobe$=$ocxhandle(D_OCX)
$adobe$->loadfile("","filename.pdf")

Where D_OCX is the ocx widget and $adobe$ is a component variable (public handle).

This works fine in our version, which version of adobe is installed on your client?


Author: Iain Sharp (i.sharp@pcisystems.co.uk)

PDF OCX

Author: dammie@seznam.cz (dammie)

Hello, I am unable to show Adobe in Uniface.... I used OCX Adobe PDF Reader ( AcroPDF.PDF )... generated signatures... I tried this, but nothing appears in form... variables HANDLE lh_ocx boolean ln_b endvariables lh_ocx = $ocxhandle ( OCX.DUMMY ) lh_ocx->loadfile( ln_b, "c:\\3gl.pdf" ) Need I use something as lh_ocx->visible(), but there is no such method or set_visible method... Any hints? Thanks. David

Dear all,

Have you a sample to use some OCX.

We wants to improve our application to insert OCX Excel with graphs.

Regards,

Antoine Picaud


Author: apicaud (antoine.picaud@free.fr)

PDF OCX

Author: dammie@seznam.cz (dammie)

Hello, I am unable to show Adobe in Uniface.... I used OCX Adobe PDF Reader ( AcroPDF.PDF )... generated signatures... I tried this, but nothing appears in form... variables HANDLE lh_ocx boolean ln_b endvariables lh_ocx = $ocxhandle ( OCX.DUMMY ) lh_ocx->loadfile( ln_b, "c:\\3gl.pdf" ) Need I use something as lh_ocx->visible(), but there is no such method or set_visible method... Any hints? Thanks. David

Using Adobe Reader X version 10.1.2

I rewrited as you sugessted, but still dont see any difference...

$adobe$=$ocxhandle(OCX)
$adobe$->loadfile("","c:\\3gl.pdf")

I got handle and there is $status = 0 after every command, but why Widget window is blank and grey and pdf is not loaded in?


I tested the same with Excel Spreedsheat and it works OK...


variables
handle lh_spreadsheet, lh_range
endvariables

lh_spreadsheet = $ocxhandle ( XL.DUMMY )
lh_spreadsheet ->get_range( lh_range, "A1", "A4" )
lh_range->set_value2("Test")


Author: dammie (dammie@seznam.cz)

PDF OCX

Author: dammie@seznam.cz (dammie)

Hello, I am unable to show Adobe in Uniface.... I used OCX Adobe PDF Reader ( AcroPDF.PDF )... generated signatures... I tried this, but nothing appears in form... variables HANDLE lh_ocx boolean ln_b endvariables lh_ocx = $ocxhandle ( OCX.DUMMY ) lh_ocx->loadfile( ln_b, "c:\\3gl.pdf" ) Need I use something as lh_ocx->visible(), but there is no such method or set_visible method... Any hints? Thanks. David

Hmmm, and you can open the PDF by double clicking on it in windows explorer? (I.e. it's not a corrupt file, or a corrupt Adobe installation.)


Author: Iain Sharp (i.sharp@pcisystems.co.uk)

PDF OCX

Author: dammie@seznam.cz (dammie)

Hello, I am unable to show Adobe in Uniface.... I used OCX Adobe PDF Reader ( AcroPDF.PDF )... generated signatures... I tried this, but nothing appears in form... variables HANDLE lh_ocx boolean ln_b endvariables lh_ocx = $ocxhandle ( OCX.DUMMY ) lh_ocx->loadfile( ln_b, "c:\\3gl.pdf" ) Need I use something as lh_ocx->visible(), but there is no such method or set_visible method... Any hints? Thanks. David

Yes click on PDF populate Adobe... 

I tested funcionality in html page simple test:


<html>
<head>
<title></title>
<script>
function Button_click() {
  
  id_PDF.loadfile( "c:\\\\3gl.pdf")
  
}
</script>

</head>
<body>
  <INPUT type="button" value="PDF load" language="javascript" onclick="return Button_click()">
  <P>
  <OBJECT id="id_PDF" style="WIDTH: 784px; HEIGHT: 592px" 
          classid="clsid:CA8A9780-280D-11CF-A24D-444553540000">
  </OBJECT>
</body>
</html>


and it works! It loads pdf in MS IE ( but it works only in MS IE. In Firefox, Google Chrome does nothing - no error no stop even if script is debuged.... same behavior as in Uniface... ).

Could it be security problem?

BTW. clsid CA8A9780-280D-11CF-A24D-444553540000 i got here:


Author: dammie (dammie@seznam.cz)

PDF OCX

Author: dammie@seznam.cz (dammie)

Hello, I am unable to show Adobe in Uniface.... I used OCX Adobe PDF Reader ( AcroPDF.PDF )... generated signatures... I tried this, but nothing appears in form... variables HANDLE lh_ocx boolean ln_b endvariables lh_ocx = $ocxhandle ( OCX.DUMMY ) lh_ocx->loadfile( ln_b, "c:\\3gl.pdf" ) Need I use something as lh_ocx->visible(), but there is no such method or set_visible method... Any hints? Thanks. David

Okay, next one. Are you using a client with services redirected using wildcards to a Urouter path?
If so, Uniface will try and run com objects on the server (bad uniface, no biscuit).
You need the following in the [SERVICES_EXEC] of the assignment file.

[SERVICES_EXEC]
ACR* =ACR* ; The other acrobat Viewer
*=$XXX:* ; Redirect all services to urouter.


Author: Iain Sharp (i.sharp@pcisystems.co.uk)

PDF OCX

Author: dammie@seznam.cz (dammie)

Hello, I am unable to show Adobe in Uniface.... I used OCX Adobe PDF Reader ( AcroPDF.PDF )... generated signatures... I tried this, but nothing appears in form... variables HANDLE lh_ocx boolean ln_b endvariables lh_ocx = $ocxhandle ( OCX.DUMMY ) lh_ocx->loadfile( ln_b, "c:\\3gl.pdf" ) Need I use something as lh_ocx->visible(), but there is no such method or set_visible method... Any hints? Thanks. David

I am stupid... solved... See Uniface Help

Test Form Components Containing OCX Controls

Form components using an OCX cannot be tested within the Uniface UDE because the tested component, and therefore the OCX control, maintains the behavior of the UDE rather than your application. This means that the OCX is loaded in a type of development mode (ambient UserMode) that might have some restrictions for the OCX.

To test your component, do one of the following:

Start a separate Uniface Development Environment using the /tst command line switch and the OCX form name.
Start a Uniface Runtime Environment.


Author: dammie (dammie@seznam.cz)

PDF OCX

Author: dammie@seznam.cz (dammie)

Hello, I am unable to show Adobe in Uniface.... I used OCX Adobe PDF Reader ( AcroPDF.PDF )... generated signatures... I tried this, but nothing appears in form... variables HANDLE lh_ocx boolean ln_b endvariables lh_ocx = $ocxhandle ( OCX.DUMMY ) lh_ocx->loadfile( ln_b, "c:\\3gl.pdf" ) Need I use something as lh_ocx->visible(), but there is no such method or set_visible method... Any hints? Thanks. David

As long as its fixed.


Author: Iain Sharp (i.sharp@pcisystems.co.uk)

PDF OCX

Author: dammie@seznam.cz (dammie)

Hello, I am unable to show Adobe in Uniface.... I used OCX Adobe PDF Reader ( AcroPDF.PDF )... generated signatures... I tried this, but nothing appears in form... variables HANDLE lh_ocx boolean ln_b endvariables lh_ocx = $ocxhandle ( OCX.DUMMY ) lh_ocx->loadfile( ln_b, "c:\\3gl.pdf" ) Need I use something as lh_ocx->visible(), but there is no such method or set_visible method... Any hints? Thanks. David

thank you for pointing out how to make Adobe pdf reader coming together. the codes above i have tried. there is just so much wrong that i can't use to generate pdf. what happening exactly. how to use Adobe pdf reader how to generate pdf document


Author: getlink (getpass366@yahoo.com)