Skip to main content
Inspiring
April 18, 2018
Question

Could not save the Preflight report of a book

  • April 18, 2018
  • 1 reply
  • 867 views

Hi all:

In a script I wrote the following lines to generate a Preflight report:

var filePreflight = new File("C:\[...]\Preflight.txt");

app.activeBook.preflight(filePreflight);

I'm working in a PC with Windows 7.

When I run the script in ExtendScript Toolkit it works fine, generates a text file containing the Preflight report.

When I run the script file .jsx in InDesign it works fine, generates a text file containing the Preflight report.

But, when I export the .jsx as binary file and run the binary script file .jsxbin in InDesign, it doesn't generate the Preflight report file.

Does anybody know why it doesn't work when running the script from a binary file?

Thanks.

Miguel

This topic has been closed for replies.

1 reply

Inspiring
April 20, 2018

Hi all:

I have also tried by generating a Preflight report for each document in the book.

The same happends, when running the compiled script it doesn't generate the report.

Am I missing any library to include?

Is there a bug?

I have noticed that I didn't said what version I'm using: InDesign CS6.

Thanks.

Miguel

Peter Kahrel
Community Expert
Community Expert
April 20, 2018

It's strange that you got it to work at all, because your file name is wrong: you should escape the backslashes:

File("C:\\[...]\\Preflight.txt")

But apart from that, what's that [. . .] doing in your path name? That looks wrong.

P.

Inspiring
April 20, 2018

Hi Peter:

The string "C:\[...]\Preflight.txt" is just the path where it generates the file. I wrote "[...]" to say that there are more folders in the structure.

I wrote that trying to be more clear, objective not achieved.

The line that I have in my script is the following:

var filePreflight = new File(folder.fsName + utils.getFileSeparator() + jobName + "_Preflight.txt");

Among the tests I have done, I have write a line in the file before running the Preflight. It wrote the line but didn't filled the file with the Preflight report.

Thanks for the interest and the answer.

Miguel