Hi
Do you have a code example in Delphi of
iterating form fields and filling/extracting data from them .
Thanks
Nir
form fields example
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: form fields example
Hello Nir,
You will need to implement this kind of iteration via JS, so please have a look at the
JS API for Acrobat Reference and I believe there would be samples inside, and pretty much all of the functions listed there are implemented and supported in our Viewer.
Best,
Stefan
You will need to implement this kind of iteration via JS, so please have a look at the
JS API for Acrobat Reference and I believe there would be samples inside, and pretty much all of the functions listed there are implemented and supported in our Viewer.
Best,
Stefan
Re: form fields example
Hi.
I can't access it directly via the activeX ?
Nir
I can't access it directly via the activeX ?
Nir
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: form fields example
Hello Nir,
You can call the method, and pass the needed JS code inside.
Best,
Stefan
You can call the
Code: Select all
HRESULT RunJavaScript(
BSTR Script,
BSTR* Result,
LONG ID,
LONG Flags
);
Best,
Stefan
Re: form fields example
Thanks,
I want to create the activex by my self (not to put it in a form )in order to perform some fields modification
I couldn't create the activex
I tried
CoPDFXCview2:= CreateComObject(StringToGUID('{FE36F0F3-F082-41B7-9EED-772505A7C054}'));
and
CoPDFXCview2:= TCoPDFXCview.Create(application);
this is what I'm trying to do
CoPDFXCview2:= CreateComObject(StringToGUID('{FE36F0F3-F082-41B7-9EED-772505A7C054}'));
CoPDFXCview2.OpenDocument('c:\form.pdf','',iActiveDocID,0);
st:='var f = getField("Text2");f.value = "Hello world";';
CoPDFXCview2.RunJavaScript(st,bsResult, 0, 0);
CoPDFXCview2.SaveDocument(0,'c:\form.pdf',0,0);
CoPDFXCview2.CloseDocument(0,0);
I want to create the activex by my self (not to put it in a form )in order to perform some fields modification
I couldn't create the activex
I tried
CoPDFXCview2:= CreateComObject(StringToGUID('{FE36F0F3-F082-41B7-9EED-772505A7C054}'));
and
CoPDFXCview2:= TCoPDFXCview.Create(application);
this is what I'm trying to do
CoPDFXCview2:= CreateComObject(StringToGUID('{FE36F0F3-F082-41B7-9EED-772505A7C054}'));
CoPDFXCview2.OpenDocument('c:\form.pdf','',iActiveDocID,0);
st:='var f = getField("Text2");f.value = "Hello world";';
CoPDFXCview2.RunJavaScript(st,bsResult, 0, 0);
CoPDFXCview2.SaveDocument(0,'c:\form.pdf',0,0);
CoPDFXCview2.CloseDocument(0,0);
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: form fields example
Hello nirnir,
Viewer ActiveX should have parent window, so you need to set some form as parent:
HTH.
Viewer ActiveX should have parent window, so you need to set some form as parent:
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
var
id:integer;
begin
CoPDFXCview2:= TCoPDFXCview.Create(self);
CoPDFXCview2.Parent:=self;
CoPDFXCview2.Visible:=false;
CoPDFXCview2.OpenDocument('c:\form.pdf', '', id, 0);
...
end;