Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

196
Visualizações
Filling out a batch of pdfs using .txt on acrobat

I keep getting the error cannot open file. I have made this work on mac only. It is supposed to go through lines of the .txt file and fill out the pdf then save as the names. It saves loads of time as there are 70+ pdf's I need to save. I have tried changing the "/" for the path to "" but that returns syntax error: unterminated string literal. It is asking me to add more details to post this so I will just add more words until it goes away.

   // specify the filename of the data file
var fileName = "/Users/rgivens/Documents/Courseware Audit Report.txt";     
    // the tab delimited text file containing the data
var outputDir = "/Users/rgivens/Desktop/Grade Change Form/";    // make sure this ends with a '/'

var err = 0;
var idx = 0;
while (err == 0) {
    err = this.importTextData(fileName, idx); // imports the next record
    if (err == -1) app.alert("Error: Cannot Open File"); 
    else if (err == -2) 
        app.alert("Error: Cannot Load Data"); 
    // else if (err == -3) 
        // We are not reporting this error because it does 
        // indicate the end of our data table: We've exhausted 
        // all rows in the data file and therefore are done with 
        // processing the file. Time to exit this loop. 
        // app.alert("Error: Invalid Row"); 
    else if (err == 1) 
        app.alert("Warning: User Cancelled File Select"); 
    else if (err == 2) 
        app.alert("Warning: User Cancelled Row Select"); 
    else if (err == 3) 
        app.alert("Warning: Missing Data"); 
    else if (err == 0) { 
        this.saveAs(outputDir + this.getField("Stu Name").value + "_" + this.getField("Stu Name 1").value + ".pdf"); // saves the file idx++; 
    }
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda