Using Active X viewer with Tools classes while creating

This Forum is for the use of Clarion For Windows - Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics.

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

Post Reply
alanlschoolcraft
User
Posts: 20
Joined: Mon Jan 20, 2014 4:05 pm

Using Active X viewer with Tools classes while creating

Post by alanlschoolcraft » Wed Sep 16, 2015 4:35 pm

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

Tracker - Clarion Support
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

Post by Tracker - Clarion Support » Thu Sep 17, 2015 1:29 am

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.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

alanlschoolcraft
User
Posts: 20
Joined: Mon Jan 20, 2014 4:05 pm

Re: Using Active X viewer with Tools classes while creating

Post by alanlschoolcraft » Thu Sep 17, 2015 1:24 pm

Thanks Craig, looking at the documentation, it will accomplish what we need.

Tracker - Clarion Support
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

Post by Tracker - Clarion Support » Thu Sep 17, 2015 1:35 pm

Hi Alan!

Good to know! :)

If you need any further help, let me know.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

alanlschoolcraft
User
Posts: 20
Joined: Mon Jan 20, 2014 4:05 pm

Re: Using Active X viewer with Tools classes while creating

Post by alanlschoolcraft » Wed Sep 23, 2015 2:17 am

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

Tracker - Clarion Support
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

Post by Tracker - Clarion Support » Wed Sep 23, 2015 12:10 pm

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.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

gcobaughSLS
User
Posts: 18
Joined: Wed Sep 23, 2015 2:07 pm

Re: Using Active X viewer with Tools classes while creating

Post by gcobaughSLS » Wed Sep 23, 2015 2:20 pm

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

Tracker - Clarion Support
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

Post by Tracker - Clarion Support » Wed Sep 23, 2015 3:03 pm

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.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

gcobaughSLS
User
Posts: 18
Joined: Wed Sep 23, 2015 2:07 pm

Re: Using Active X viewer with Tools classes while creating

Post by gcobaughSLS » Wed Sep 23, 2015 3:34 pm

Email sent with zip file

Tracker - Clarion Support
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

Post by Tracker - Clarion Support » Wed Sep 23, 2015 5:40 pm

Hi George!

Received, please see email from me per your problem.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

gcobaughSLS
User
Posts: 18
Joined: Wed Sep 23, 2015 2:07 pm

Re: Using Active X viewer with Tools classes while creating

Post by gcobaughSLS » Thu Sep 24, 2015 12:03 am

Did you send to me? Or to Alan? I didn't get it yet.

Thanks

Tracker - Clarion Support
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

Post by Tracker - Clarion Support » Thu Sep 24, 2015 1:16 am

I sent it to gand_t@hotmail.com.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Tracker - Clarion Support
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

Post by Tracker - Clarion Support » Fri Oct 02, 2015 4:13 pm

This subject has been answered in emails due to confidential nature of some information. :)
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Post Reply

Return to “PDF-Tools SDK (DLL Libraries Only) - Clarion For Windows Developers Only Please”