Recent Posts

Pages: [1] 2 3 4 5 6 7 8 ... 10
"cHob10" is a string and i is a number.

While I do not know much about javascript, I know that you cannot add numbers to a string.

Usually you would have a string like "cHob" and then to that string append a string with the number. So the number i first needs to be converted to a string, and then the two strings concatenated.

Though it may be that javascript converts a number to string automatically. But it will likely not prepend leading zeroes.

So using
Code: [Select]
"cHob0"+ i will give you a sequence like:
Guide me what to write

I am also not javascript expert Just beginner

I saw the video copied it and tried to use it in scribus
General Discussion / What is your best Scribus feature?
« Last post by digirew on Today at 05:23:48 pm »
Im fairly new to Scribus and wondering what is the top feature everyone loves about Scribus that they use each day?

For me, it's the powerful Scripter API - allowing you to bring automation into your documents!

Again this line is wrong:
var Hob = this.getField("cHob10"+ i);

This code will not increment field names to cHob10, cHob11, cHob12, etc...
I tried with renaming fields to cHob10 and so on also change the Item fields names to Hob10... and so on

It's not working

There was error earlier in the code rectified instead of Hobbies it should have been Hob
var items = [ ];

for (i = 0; i<19; i++) {

var Hob = this.getField("cHob10"+ i);

if (Hob.value !="Off"){

items.push(items.length+1 + ". " + Hob.value);
event.value = "Your Hobbies are listed below: "+  "\n" + items.join("\n");
if(items.length<=0) {event.value = " "}
While I'm not a JavaScript specialist, I think this line is wrong:
var Hobbies = this.getField("cHob1"+ i);

This would likely give you cHob10, cHob11, cHob12 as field names instead of the wanted cHob1, cHob2, cHob3.
Inspired by a video on PDF Form javascript to transfer values of Checkbox to a text field in a proper listed format
I tried to name the checkbox field in a sequence manner cHob.01, but dot(.) is not accepted in name field of checkbox, I then named my name field sequence in cHob1, cHob2, cHob3 and then I created the declared variables and set an array as described in video here is the code, but its not working
var items = [ ];

for (i = 0; i<10; i++) {

var Hobbies = this.getField("cHob1"+ i);

if (Hob.value !="Off"){

items.push(items.length+1 + ". " + Hob.value);
event.value = "Your Hobbies are listed below: "+  "\n" + items.join("\n");
if(items.length<=0) {event.value = " "}

The above code works fine in acrobat dc pro as in video but not in scribus.
User Interface / Re: Automatic Text Frames
« Last post by digirew on Today at 04:53:00 am »

If you have the one text frame per page (that was generated from the automatic text frame when creating the new document). and then you change your document margins, you should be able to create a python script via. Scripter API to achieve what you are after, and have all the automatic text frames resize to the new page margins.

I went through the API commands (, and all the commands that would be needed appear to be available, you just need a script written!
General Discussion / Re: hangs Fiery RIP
« Last post by zerubbabel on December 03, 2020, 11:32:44 pm »
Well, I use Linux and don't have Acrobat, but none of my pdf tools have any problem with the Scribus-exported pdf files.
General Discussion / Re: hangs Fiery RIP
« Last post by digirew on December 03, 2020, 09:37:08 pm »
I suggest posting your finding into the bug tracker so that the dev. team can look/comment on it.

Just curious if you tried opening the file with something like Adobe Acrobat - and do a preflight to see if it shows any errors?

Pages: [1] 2 3 4 5 6 7 8 ... 10