Highlighted

[Scripting] Problem generating book preflight report

Adobe Community Professional ,
Aug 10, 2020

Copy link to clipboard

Copied

I'm sure this is something simple, but I'm not accustomed to working with book preflight options, but I cannot get the following code to generate the preflight report.

 

book.preflight(new File(outFol.fsName + "/" + outFileName + "-preflight.pdf"), true);

 

I know the path is good, because I am exporting a pdf of the book right after it successfully. I've tried setting the file to txt but no go either. Do I need to do something with the preflightBookOptions? Thanks. 

 

Edit: I came across this thread, in which Jongware suggests you have to set the working profile. I've tried amending my code as such, but still no bites. I've tried without the profilePolicy and scope.

Any help would be appreciated.  

 

var outFileName = book.name.replace(".indb","");
var pbo = book.preflightBookOptions;
var prefFile = File(outFol.fsName + "/" + outFileName + "-preflight.pdf");
pbo.preflightProfilePolicy = PreflightProfileOptions.USE_WORKING_PROFILE;
pbo.preflightWorkingProfile = app.preflightProfiles.lastItem();
pbo.preflightScope = PreflightScopeOptions.PREFLIGHT_ALL_DOCUMENTS;
book.preflight(prefFile, false);

 

Topics

Scripting

Views

20

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

[Scripting] Problem generating book preflight report

Adobe Community Professional ,
Aug 10, 2020

Copy link to clipboard

Copied

I'm sure this is something simple, but I'm not accustomed to working with book preflight options, but I cannot get the following code to generate the preflight report.

 

book.preflight(new File(outFol.fsName + "/" + outFileName + "-preflight.pdf"), true);

 

I know the path is good, because I am exporting a pdf of the book right after it successfully. I've tried setting the file to txt but no go either. Do I need to do something with the preflightBookOptions? Thanks. 

 

Edit: I came across this thread, in which Jongware suggests you have to set the working profile. I've tried amending my code as such, but still no bites. I've tried without the profilePolicy and scope.

Any help would be appreciated.  

 

var outFileName = book.name.replace(".indb","");
var pbo = book.preflightBookOptions;
var prefFile = File(outFol.fsName + "/" + outFileName + "-preflight.pdf");
pbo.preflightProfilePolicy = PreflightProfileOptions.USE_WORKING_PROFILE;
pbo.preflightWorkingProfile = app.preflightProfiles.lastItem();
pbo.preflightScope = PreflightScopeOptions.PREFLIGHT_ALL_DOCUMENTS;
book.preflight(prefFile, false);

 

Topics

Scripting

Views

21

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Have something to add?

Join the conversation