[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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
Some information is helpful. Thank for sharing. informdecisions
Author: johnland (johnland8193@gmail.com)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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
Last question
how remove this second slide bar ? :@ (it's on entity)
Author: Dylan (dylan.huart@gmail.com)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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 come back on the subject for ask you if you know how to load another pdf format in the ocx? e.g. : .tif,.jpg,.png... Thanks
Author: Dylan (dylan.huart@gmail.com)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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 can use $rscan to find the position of the rightmost ".". Use the index returned to separate the extension. If you code the case statements using (syntax) strings in single quotes, you do not need the $lowercase. selectcase (v_extension) case 'pdf' ...
Author: ulrich-merkel (ulrichmerkel@web.de)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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 for this complete response, it helps me a lot, and brings new knowledge on uniface
Author: Dylan (dylan.huart@gmail.com)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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
Method 1 if($lowercase(field[$length(field)-4:4]) = ".pdf") ; Get last 4 characters, compare (limits to 3 char extension) Method 2 (+; = <GOLD>;) if($lowercase($itemnr(-1,$replace(field,1,".","+;",-1))) = "pdf") ; Get string following last . compare. (Allows for many char extension) The first one is simpler, but the second allows for expansion to a case statement testing for different extensions... selectcase $lowercase($itemnr(-1,$replace(field,1,".","+;",-1))) case "pdf" ..... case "htm" .... case "html" ..... elsecase .... endselectcase
Author: Iain Sharp (i.sharp@pcisystems.co.uk)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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 know how the loaded file ends in ".pdf" what the best method for you ?
Author: Dylan (dylan.huart@gmail.com)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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
Hello, Thank for your help Ulrich, For the extensions it's good
but when I would show a pdf file after an image, nothing :s because "Edit/Display/idle statement only allowed in EXECUTE trigger" I use 2 buttons for navigate between the attachments and this button call an Entries in Local Proc modules showing the next attachments (if I would show the next attachments e.g.) I don't see how I can show otherwise ideas ? :/
Author: Dylan (dylan.huart@gmail.com)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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 fields need to be shown or hidden within either your occurrence shifting code (from the buttons), or in the occurrence gets focus trigger of the entity. There is no need for edit, or display. Simply set the field_syntax of one field to "HID" and the other one to "" (or is it "DEF"?) to brting it back to view. You may get results if you replace the code in your button which says edit with 'show'.
Author: Iain Sharp (i.sharp@pcisystems.co.uk)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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 put the "show" at the end of each button event but now the first call from my FRM he doesn't read the first pdf, for images there are no worries
Author: Dylan (dylan.huart@gmail.com)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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 just indenting my code and ... it works !! this is strange haha..
Author: Dylan (dylan.huart@gmail.com)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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
Hi, I understood Thank you again
Author: Dylan (dylan.huart@gmail.com)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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
That OCX will not support image types. (You can't open them in Adobe reader). What we have done is to paint two widgets, one an OCX widget linked to adobe, and the other a picture widget side by side on the form, and set both of them to attach to window borders (left, right and bottom). If the loaded file ends in ".pdf" we load it into the ocx as above and hide the picture widget , if not we use lfileload/image "c:\\test2.jpg", FIELDPIC.CINOMPJ and then hide the ocx field.
Author: Iain Sharp (i.sharp@pcisystems.co.uk)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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
Hello, Thank you for your reply, but I have still the same problem: I create a FRM test to understand the OCX container, in this FRM I create a entity "CINOMPJ" in which I put my OCX, I then assigned AcroPDF then a button , in the trigger "Details" I put this code: variables HANDLE lh_ocx boolean ln_b endvariables lh_ocx = $ocxhandle ( FIELDOCX.CINOMPJ ) lh_ocx->loadfile( ln_b, "c:\\test2.pdf" ) display but when I test the OCX remains gray
any idea? Thank you
Author: Dylan (dylan.huart@gmail.com)
[SOLVED] fill ocx container by pdf source
Author: dylan.huart@gmail.com (Dylan)
Hello
, 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
With the ocx widget connected to the ocx container, import the signature (button on the OCX properties form) This should give you a signature caller ACROPDF (I think) The operation to use against this signature is loadfile(boolean,string) e.g. v_filename = "c:\\temp\\fred.pdf" $ocxhandle(ocx_field)->loadfile(v_loaded,v_filename) This needs to be done after the edit or show command has been run on the form containing the ocx widget. (so not in the exec trigger, unless there's an explicit show). Other operations imported with this signature should/will allow you to control which adobe functions are shown in the adobe menu, and to do things like print out the pdf from a uniface button/proc.
Author: Iain Sharp (i.sharp@pcisystems.co.uk)