May I know if its possible to create a csv at run time and write some info (like title, pagenum, etc) to it? I created a simple scenario below for easy understanding.
Kindly let me know your thoughts?
roottag:before{
content: prince-script(openfile, page)
}
section, chapter, backmatter{
content: prince-script(writefile, page, content())
}
function openfile(){
var file = new File('c:\test.csv');
file.open('w');
file.close();
return null;
}
function writefile(page, text){
file.open('a');
file.write(page + ' - ' + text);
file.close();
return null;
}
Kindly let me know your thoughts?