You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "Kiedrowski, Lukasz" <lu...@capgemini.com> on 2016/12/12 13:29:15 UTC

How triger javascript after field.setValue ()

Hi,
I have to fill pdf form (AcroForm) programmatically .

I know that fields I am filling have PDAction (PDActionJavaScript).
Eg.:
kPreis: PDFormFieldAdditionalActions js field actionS:
COSDictionary{(COSName{V}:COSDictionary{(COSName{JS}:COSString{setKKostenPreisChanged()}) (COSName{S}:COSName{JavaScript}) }) }
setKKostenPreisChanged()

When I change field Value and save pdf and then open it again  I see that the action (javascript code) wasn’t invoked.
How to force programmatically to run that javascript code?
I will be grateful for any help

Br,
LukasK


_______________________________________________________________________
[Email_CBE.gif]Lukasz Kiedrowski
software engineer | NSC CSD

Capgemini | Poznan
Phone: +48616572737 –
e-mail: lukasz.kiedrowski@capgemini.com
www.pl.capgemini.com<http://www.pl.capgemini.com/>

ul. Kolorowa 6, 60-378 Poznan, Poland
People matter, results count.
_______________________________________________________________________
Connect with Capgemini:
[cid:image006.png@01CCBA6D.0B1D4150]<http://www.pl.capgemini.com/>[cid:image007.png@01CCBA6D.0B1D4150]<https://twitter.com/CapgeminiPL>[cid:image008.png@01CCBA6D.0B1D4150]<https://www.facebook.com/CapgeminiPL>[cid:image009.gif@01CCBA6B.A83786A0]<https://plus.google.com/107325823920840385636/posts>[cid:image013.png@01CCBA6D.0B1D4150]<http://www.linkedin.com/company/capgemini>[cid:image014.png@01CCBA6D.0B1D4150]<https://www.xing.com/companies/capgemini/about>[cid:image015.png@01CCBA6D.0B1D4150]<http://www.slideshare.net/capgemini>[cid:image016.png@01CCBA6D.0B1D4150]<http://www.youtube.com/capgeminimedia>



________________________________

Capgemini Polska Sp. z o.o.,
Al. Jerozolimskie 96, 00-807 Warszawa,
Sąd Rejonowy dla M.ST. Warszawy, XII Wydział Gospodarczy Rejestrowy, nr KRS: 0000040605,
NIP: 526-11-84-467,
Wysokość kapitału zakładowego: 16.403.320,00 zł.
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

RE: How triger javascript after field.setValue ()

Posted by "Kiedrowski, Lukasz" <lu...@capgemini.com>.
Hm,
maybe there is any other solution ? eg. Add some  JavaScript at the loading time of document, that will invoke  all needed functions?

-----Original Message-----
From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]
Sent: Monday, December 12, 2016 2:59 PM
To: users@pdfbox.apache.org
Subject: Re: How triger javascript after field.setValue ()

Hi,

> Am 1

2.12.2016 um 14:29 schrieb Kiedrowski, Lukasz <lu...@capgemini.com>:
>
> Hi,
> I have to fill pdf form (AcroForm) programmatically .
> I know that fields I am filling have PDAction (PDActionJavaScript).
> Eg.:
> kPreis: PDFormFieldAdditionalActions js field actionS:
> COSDictionary{(COSName{V}:COSDictionary{(COSName{JS}:COSString{setKKos
> tenPreisChanged()}) (COSName{S}:COSName{JavaScript}) }) }
> setKKostenPreisChanged()
>
> When I change field Value and save pdf and then open it again  I see that the action (javascript code) wasn’t invoked.
> How to force programmatically to run that javascript code?

at that point in time PDFBox doesn't execute any JavaScript code nor does it have a JavaScript implementation.

BR
Maruan



> I will be grateful for any help
>
> Br,
> LukasK
>
>
>
> ______________________________________________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


________________________________

Capgemini Polska Sp. z o.o.,
Al. Jerozolimskie 96, 00-807 Warszawa,
Sąd Rejonowy dla M.ST. Warszawy, XII Wydział Gospodarczy Rejestrowy, nr KRS: 0000040605,
NIP: 526-11-84-467,
Wysokość kapitału zakładowego: 16.403.320,00 zł.
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

Re: How triger javascript after field.setValue ()

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,

> Am 12.12.2016 um 14:29 schrieb Kiedrowski, Lukasz <lu...@capgemini.com>:
> 
> Hi,
> I have to fill pdf form (AcroForm) programmatically .
> I know that fields I am filling have PDAction (PDActionJavaScript).
> Eg.:
> kPreis: PDFormFieldAdditionalActions js field actionS:
> COSDictionary{(COSName{V}:COSDictionary{(COSName{JS}:COSString{setKKostenPreisChanged()}) (COSName{S}:COSName{JavaScript}) }) }
> setKKostenPreisChanged()
>  
> When I change field Value and save pdf and then open it again  I see that the action (javascript code) wasn’t invoked.
> How to force programmatically to run that javascript code?

at that point in time PDFBox doesn't execute any JavaScript code nor does it have a JavaScript implementation.

BR
Maruan



> I will be grateful for any help
>  
> Br,
> LukasK
>  
>  
> 
> _______________________________________________________________________
> 
> Lukasz Kiedrowski
> software engineer | NSC CSD
>  
> Capgemini | Poznan
> Phone: +48616572737 –
> e-mail: lukasz.kiedrowski@capgemini.com
> www.pl.capgemini.com
>  
> ul. Kolorowa 6, 60-378 Poznan, Poland
> People matter, results count.
> _______________________________________________________________________
> 
> Connect with Capgemini:
> 
>  
>  
> 
> 
> Capgemini Polska Sp. z o.o.,
> Al. Jerozolimskie 96, 00-807 Warszawa,
> Sąd Rejonowy dla M.ST. Warszawy, XII Wydział Gospodarczy Rejestrowy, nr KRS: 0000040605,
> NIP: 526-11-84-467,
> Wysokość kapitału zakładowego: 16.403.320,00 zł.
> 
> 
> 
> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org