[Scribus] (Bump) PDF Form calculations

MaHan ma_han2000
Thu Mar 1 19:53:02 CET 2007

--- Thomas Worthington <tscribus at tww.cx> wrote:

> Sorry to post this again, but if I can't get it to
> work by Monday am I'll  
> have to get someone with Acrobat to do it for me
> (and pay them).
>     Very simple request: I need a PDF for which
> takes a price entered in one
> field, multiplies by 3, checks a button to see if
> VAT is to be added at
> 17.5% and if so adds it to the total, then sets a
> second read-only field
> to the result.
> I've tried all sorts of things in the custom
> calculation but I can only
> get the AFSIMPLE_CALCULATION function to work and
> that's not adequate.

Gosh, I haven't done it for years, bug we cannot allow
that you turn your back on Scribus and play with the
nasty, nasty Acrobat, can we:)

Anyway: you need 2 text fields, name them field1 and
field2 and a check box for VAT, name it  checkbox1:

field1: it's for entering the price, set its format to

field2: set it to read only and its format to
"number", go to the calculate tab, and enter this
custom script (hackers on the list please forgive


var f = this.getField('field1');
var v = this.getField('checkbox1');
	var vat = f.value * 0.175;
	var vat = 0;

event.value= f.value * 3 + vat; 


I'm attaching two test files for you to play with


New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes. 
-------------- n?chster Teil --------------
Ein Dateianhang mit Bin?rdaten wurde abgetrennt...
Dateiname   : test2.sla.gz
Dateityp    : application/x-gzip-compressed
Dateigr??e  : 7979 bytes
Beschreibung: 449098978-test2.sla.gz
URL         : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20070301/a3ab0cb5/attachment-0001.bin 
-------------- n?chster Teil --------------
Ein Dateianhang mit Bin?rdaten wurde abgetrennt...
Dateiname   : test2.pdf
Dateityp    : application/pdf
Dateigr??e  : 4677 bytes
Beschreibung: 2069482395-test2.pdf
URL         : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20070301/a3ab0cb5/attachment-0001.pdf 

More information about the scribus mailing list