Question
Batch jpg to pdf to ms word
Hello forum!
I need help (sorry for my English)
I need a script that makes several moves:
1. user chooses a folder
2. create PDF from JPG ( from full path )
3. save as MS Word ( with options: OCR false, Comments false )
4. close PDF without saving
I'm not a newbie but i never developed for Acrobat.
Please help me with my simple task.
Thanks!
function get_files(path){
var folder = Folder(path).getFiles()
for(var i = 0; i < folder.length; i++){
if(File(folder[i]).constructor.name == 'Folder'){get_files(folder[i])}
else{
var f = File(folder[i]).fsName
if(f.split('.').slice(-1)[0].toLowerCase() == 'jpg'){
files[f.split('\\').slice(-1)[0].split('.').slice(0,-1).join('.')] = f
}
}
}
}
var path = Folder.selectDialog('')
if(path != null){
var files = {}
get_files(path)
for(k in files){
// here k is filename without extension
// files[k] is fullpath
createPDF()
saveasMSWord()
closePDF()
}
}
