Skip to main content
Inspiring
December 30, 2014
Question

Book preflight with InDesign CC Server

  • December 30, 2014
  • 1 reply
  • 415 views

Hi,

I'm trying to preflight a book using InDesign Server CC. Preflight seems to be done (takes somes seconds) but no pdf report is generated.

Same code works perfectly on InDesign CC Desktop.

Even tested to first write 'Coucou' to the file (just to check the path is correct and not write-protected). When I open the file, found 'Coucou'.

Code:

function fnPreflightBook(pLog, pIDBook, pstrPdfReportFileName)

{

    var preflightProfile = app.preflightProfiles.firstItem();

    pLog.addMsg("Execution controle en amont <" + preflightProfile.name + ">");

   

    var f=new File("c:\\jtripoz\\jako.pdf");

    $.writeln(f.exists);

   

   

    f.open("w");

    f.write("Coucou");

    f.close();

   

    $.writeln(f.exists);

   

    try

    {

        // False = DO NOT open automatically the report after creation

        pIDBook.preflight(f);           

    }

    catch(ex)

    {

        pLog.addError("Erreur lors du controle en amont: " +ex.message);

        return LOG_RETURN_ERROR;               

    }

   

    pLog.addMsg("Controle en amont OK");

   

    return LOG_RETURN_OK;

}

And log :

-- INFO: Mardi, Décembre 30 2014 11:14:47 - Controle en amont OK

-- INFO: Mardi, Décembre 30 2014 11:14:47 - Export PDF C:\jtripoz\FISC-6-2014\jako.pdf(Profil: PDFACI_Jouve_colibri_UAT)

-- INFO: Mardi, Décembre 30 2014 11:14:55 - Fermeture du fichier  /c/jtripoz/FISC-6-2014/jako.log

Any idea ?

TIA,

J.

This topic has been closed for replies.

1 reply

Peter Spier
Community Expert
Community Expert
December 30, 2014

I've moved this over to InDesign Scripting because I think you are more likely to find Server users here who can help.