Atlast I found out, the only thing i need is, if the same style repeated in other page, the pdf is overrited. as per Vam's advice.
So how can i solve this.. Please
for(var p = 0; p < app.documents[0].pages.length; p++) {
var fr = app.documents[0].pages[p].textFrames;
var pdf_name = null;
for(var i = 0; i < frames.length; i++) {
if(fr[i].paragraphs[0].appliedParagraphStyle.name == 'Cover Heading-White') {
pdf_name = fr[i].paragraphs[0].contents;
break;
}
}
if(pdf_name != null) {
app.pdfExportPreferences.pageRange = app.documents[0].pages[p].name;
var export_preset = app.pdfExportPresets.item("[Smallest File Size]");
app.activeDocument.exportFile(ExportFormat.pdfType, File("/Users/xxxx/Desktop/Local/untitled folder/" + pdf_name + ".pdf"), false);
}
}
thanks a lot for VAM's clue and suggestion.