Using Active X viewer with Tools classes while creating
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators
-
- User
- Posts: 20
- Joined: Mon Jan 20, 2014 4:05 pm
Using Active X viewer with Tools classes while creating
Is there a way to use the active X viewer to readily show any added or modified acro form objects using the tools classes after any control/object add or change to the x/y position or font? I have tried using both, but can not seem to get the PDF in the tools workspace to show in the active X viewer on the same window. Searched help, and the forum, but can not find any info. Is it even possible?
Thanks
Thanks
-
- Site Admin
- Posts: 1412
- Joined: Wed Jun 30, 2004 4:45 pm
- Location: Maryland, USA
- Contact:
Re: Using Active X viewer with Tools classes while creating
Hi Alan!
Not in the way you mean.
You could use the Viewer ActiveX to open an existing PDF, create the field in the PDF on one of the pages using the JavaScript engine, and then save the modified PDF file. After that, the field should appear in the Fields pane in the Viewer.
The hard part is going to be figuring out the location and size of the field.
If you intend to do this you will find this document invaluable:
http://www.adobe.com/content/dam/Adobe/ ... erence.pdf
The section on Field is what you want.
Not in the way you mean.
You could use the Viewer ActiveX to open an existing PDF, create the field in the PDF on one of the pages using the JavaScript engine, and then save the modified PDF file. After that, the field should appear in the Fields pane in the Viewer.
The hard part is going to be figuring out the location and size of the field.
If you intend to do this you will find this document invaluable:
http://www.adobe.com/content/dam/Adobe/ ... erence.pdf
The section on Field is what you want.
-
- User
- Posts: 20
- Joined: Mon Jan 20, 2014 4:05 pm
Re: Using Active X viewer with Tools classes while creating
Thanks Craig, looking at the documentation, it will accomplish what we need.
-
- Site Admin
- Posts: 1412
- Joined: Wed Jun 30, 2004 4:45 pm
- Location: Maryland, USA
- Contact:
Re: Using Active X viewer with Tools classes while creating
Hi Alan!
Good to know!
If you need any further help, let me know.
Good to know!

If you need any further help, let me know.
-
- User
- Posts: 20
- Joined: Mon Jan 20, 2014 4:05 pm
Re: Using Active X viewer with Tools classes while creating
Started using java script to fill acro fields with activex. It seems that after opening, and getting a list of fields, it crashes after updating a number of fields. A small form with 6 text fields fills fine. But a busier document with 100+ fields crashes after about 15 to 20. If I stop after 10 or so, document saves fine with fields filled in. But if I continue, it crashes. Tried saving, closing, and re-opening to no avail. Java includes function with two parameters, fieldname, and data to fill. Followed by function call to AddData("xxx","abc") . The code does work, but only for a limited number of calls. Any help would be appreciated. I tried in batch mode sending function and all calls, as well as function,call pairs for each field. Same result.
Here is the code being used in the loop of a Q,
IF FormFieldQ.FieldData <> ''
FREE(JS_Input)
FREE(JS_Output)
JS_Input.Line = 'function setFieldValue(d,n) {{ var f = this.getField(n); f.value = d; }'
PUTINI('JSInputLine','Function',CLIP(JS_Input.Line),'c:\slsdev\jsdebug.ini')
ADD(JS_Input)
JS_Input.Line = 'setFieldValue("' & CLIP(FormFieldQ.FieldData) & '","' & CLIP(FormFieldQ.FieldName) & '");'
PUTINI('JSInputLine'&i#,'line'&i#,CLIP(JS_Input.Line),'c:\slsdev\jsdebug.ini')
ADD(JS_Input)
PUTINI('Running','Script','Running','c:\slsdev\jsdebug.ini')
PDFForm.RunJavaScript(LOC:DocID,JS_Input,JS_Output,0)
GET(JS_Output,1)
END
Thanks
Here is the code being used in the loop of a Q,
IF FormFieldQ.FieldData <> ''
FREE(JS_Input)
FREE(JS_Output)
JS_Input.Line = 'function setFieldValue(d,n) {{ var f = this.getField(n); f.value = d; }'
PUTINI('JSInputLine','Function',CLIP(JS_Input.Line),'c:\slsdev\jsdebug.ini')
ADD(JS_Input)
JS_Input.Line = 'setFieldValue("' & CLIP(FormFieldQ.FieldData) & '","' & CLIP(FormFieldQ.FieldName) & '");'
PUTINI('JSInputLine'&i#,'line'&i#,CLIP(JS_Input.Line),'c:\slsdev\jsdebug.ini')
ADD(JS_Input)
PUTINI('Running','Script','Running','c:\slsdev\jsdebug.ini')
PDFForm.RunJavaScript(LOC:DocID,JS_Input,JS_Output,0)
GET(JS_Output,1)
END
Thanks
-
- Site Admin
- Posts: 1412
- Joined: Wed Jun 30, 2004 4:45 pm
- Location: Maryland, USA
- Contact:
Re: Using Active X viewer with Tools classes while creating
Hi Alan!
Not good! Can you please zip up and email me a copy of the form and the JavaScript that is crashing? We'll need those to test with here.
Not good! Can you please zip up and email me a copy of the form and the JavaScript that is crashing? We'll need those to test with here.
-
- User
- Posts: 18
- Joined: Wed Sep 23, 2015 2:07 pm
Re: Using Active X viewer with Tools classes while creating
Hi Craig, this is George Cobaugh. I have my own login for the forum now. Alan was just passing along the info as I found it. Now I can deal directly to the forum. I will send the zipped up file with the txa code of my test procedure, and the pdf form I am testing with. It is part of a much larger system and database, so the entirety would be difficult. I can dump the Q data to a csv, so you will have the data as well as the pdf form you could import into a Q and run the exact test I am. I did a further trace, and found that the last line that was run in the class code before crash was to the parent call, it never returned. I will document that as well. I'll get your email from Alan and send all to you this morning.
Thanks,
George
Thanks,
George
-
- Site Admin
- Posts: 1412
- Joined: Wed Jun 30, 2004 4:45 pm
- Location: Maryland, USA
- Contact:
Re: Using Active X viewer with Tools classes while creating
Hi George!
Thanks, I don't think I need to see your Clarion code, but I do need to see the form and the JavaScript that you are trying to use to load the data into the form, as this seems to be a JavaScript Engine problem.
Thanks, I don't think I need to see your Clarion code, but I do need to see the form and the JavaScript that you are trying to use to load the data into the form, as this seems to be a JavaScript Engine problem.
-
- User
- Posts: 18
- Joined: Wed Sep 23, 2015 2:07 pm
Re: Using Active X viewer with Tools classes while creating
Email sent with zip file
-
- Site Admin
- Posts: 1412
- Joined: Wed Jun 30, 2004 4:45 pm
- Location: Maryland, USA
- Contact:
Re: Using Active X viewer with Tools classes while creating
Hi George!
Received, please see email from me per your problem.
Received, please see email from me per your problem.
-
- User
- Posts: 18
- Joined: Wed Sep 23, 2015 2:07 pm
Re: Using Active X viewer with Tools classes while creating
Did you send to me? Or to Alan? I didn't get it yet.
Thanks
Thanks
-
- Site Admin
- Posts: 1412
- Joined: Wed Jun 30, 2004 4:45 pm
- Location: Maryland, USA
- Contact:
-
- Site Admin
- Posts: 1412
- Joined: Wed Jun 30, 2004 4:45 pm
- Location: Maryland, USA
- Contact:
Re: Using Active X viewer with Tools classes while creating
This subject has been answered in emails due to confidential nature of some information. 
