Skip to main content
heresha93876846
Inspiring
October 6, 2016
Answered

How do I add a subfolder to Cpath?

  • October 6, 2016
  • 1 reply
  • 632 views

I have this code and I want to add subfolder to the code so the output files will go in a subfolder named pdf. How can I do this??

/* Extract Pages to Folder */

    var re = /.*\/|\.pdf$/ig;

    var filename = this.path.replace(re,"");

    {

        for ( var i = 0;  i < this.numPages; i++ )

        this.extractPages

         ({

            nStart: i,

            cPath : Number(filename) + (i+1) + ".pdf"

        });

    };

This topic has been closed for replies.
Correct answer Test Screen Name

Update the value you set for cPath. Note that the directory separator character is / not \ in this case e.g. Directory/file.pdf. Be sure to create the folder first, Acrobat won't do that.

1 reply

Test Screen NameCorrect answer
Legend
October 6, 2016

Update the value you set for cPath. Note that the directory separator character is / not \ in this case e.g. Directory/file.pdf. Be sure to create the folder first, Acrobat won't do that.

heresha93876846
Inspiring
October 6, 2016

Thank you very much! Now I have a javascript that outputs all of the singel sided pdf:s to the subfolder pdf that I have created manually.