Skip to main content
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

Uniface Development: [SOLVED] fill ocx container by pdf source

[SOLVED] fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

31 replies

Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

[SOLVED] fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

In trigger Details of save button


Author: Dylan (dylan.huart@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

[SOLVED] fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

Where did you get the file you used in the loadfile command from? 


Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

[SOLVED] fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

for images it's ok but for pdf I can't use lfiledump/raw <field>,<filename>, the size of my pdf is 0 octet : if($chaine$ = "pdf")      lfiledump/raw LIBTEXTE.CINOMPJ,$PJOINTE$     if($status > 0)Call GG_AFFMSG("I","", "Le fichier est bien enregistré : %%$PJOINTE$")  else     lfiledump/image IMGPJ.CINOMPJ,$PJOINTE$     if($status > 0)Call GG_AFFMSG("I","", "Le fichier est bien enregistré : %%$PJOINTE$")  Endif


Author: Dylan (dylan.huart@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

&#091;SOLVED&#093; fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

for images  lfiledump/image <field>, <filename> for pdf lfiledump/raw <field>,<filename>


Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

&#091;SOLVED&#093; fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

good job It's ok Last question, how save the current file on OCX or Picture in e.g. C:/temp ? Thanks for your help


Author: Dylan (dylan.huart@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

&#091;SOLVED&#093; fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

I think occurrence gets focus is your friend here. However the occurrence is reached (first load, next or previous button) this trigger will be fired. Put your processing for the pdf  and the switch of the fields in here. 


Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

&#091;SOLVED&#093; fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

The loadfile operation requires a file on the hard drive. So when you are loading the file into the OCX widget for display, where does that file name come from?  If you are storing the image/pdf in the database, then it's the database field (not the OCX field) which you need to lfiledump.  If you are reading files off the hard drive, and want to copy them to c:\\temp check out lfilecopy... 


Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

&#091;SOLVED&#093; fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

Right click the entity, choose entity scroll bar, choose No.  (I assume the buttons at the top control entity occurrence position? )


Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

&#091;SOLVED&#093; fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

thank you Yes I will try to show (if several) the diferent pdf, for that I have the name of the document in database and based on a  folde number (unique) I must be able to recover it is not yet functional I esayer see how


Author: Dylan (dylan.huart@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

&#091;SOLVED&#093; fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

You'll probably need to put the adobe loadfile into the occurrence gets focus trigger of the entity, I don't think you get a different copy of the ocx for each occurrence. 


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