3 Replies Latest reply on Jun 7, 2012 1:08 PM by LyNcHii

    How to save like that : XXX_YYY_.counter.pdf

    LyNcHii

      Hello everyone, first of all i would like to tell you that i don't speak a fluent english but i will do my best.

      I'm making a PDF Form and i would like to allow users to save their form when they click on a button. the completed form should be save like that : XXX_YYY_increment.pdf.

      I meet an issue about "the increment". Indeed i already know how to use field's value in the fonction saveAs but i don't kow how to use the counter.

      This is what i've done :

      "this.saveAs("./" + this.getField("Country").value + "_" + this.getField("City").value + ".pdf");"

      Here is an exemple.

      I've on my computer a PDF Form, i ask to my family to complete it and then to click on the save button.
      I've two list, in the first one i can choose a country and in a second one i can choose a city.

      My mother chooses in the first one "France" and in the second one "Paris" THEN she closes the reader
      My father opens a new empty form chooses in the first one "Germany" and in the second one "Berlin" THEN he closes the reader
      My sister opens a new empty form chooses in the first one "France" and in the second one "Paris" THEN she closes the reader

      My brother opens a new empty form chooses in the first one "France" and in the second one "Paris". THEN he closes the reader

      I would like to find in my folder later these documents:

      France_Paris_001.pdf
      Germany_Berlin_001.pdf

      France_Paris_002.pdf

      France_Paris_003.pdf

      etc...


      I don't have any idea how to do that with javascript in a PDF form.Could you bring me some help please?

      Thank you in advance