Preflight methods

createComplianceProfile

getNthProfile

getNumProfiles

getProfileByName

getProfileByFingerPrint

createComplianceProfile

9.0

 

 

P

Creates a compliance profile for a given PDF standard for the document.

Parameters

cStandardKey 

The PDF Standard version to verify.

oThermometer

(optional) Show the status window and the progress bar that indicates to the user that a lengthy operation is in progress. To acquire a Thermometer object, use app.thermometer. If oThermometer is not specified, no progress is shown.

Valid standard version keys:

Returns

A PreflightProfile object. Undefined is returned otherwise.

Example

Check the current PDF document to PDF/A-1b:2005 compliance.

var oProfile = Preflight.createComplianceProfile("PDF/A-1b:2005")

if( oProfile != undefined )

{

   var oThermometer = app.thermometer;

   var myPreflightResult = this.preflight( oProfile, true, oThermometer);

   if( myPreflightResult.numErrors > 0 ) {

      console.println( "PDF document is NOT PDF/A-1b:2005 compliant.");

   } else {

   console.println( "PDF document is PDF/A-1b:2005 compliant.");

   }

}

getNthProfile

9.0

 

 

P

Retrieves the Nth Preflight profile from the list of installed Preflight profiles.

Parameters

nIndex 

The zero-based index of the profile that should be obtained.

oThermometer

(optional) Shows the status window and the progress bar that indicates to the user that a lengthy operation is in progress. To acquire a Thermometer object, use app.thermometer. If oThermometer is not specified, no progress is shown.

Returns

A PreflightProfile object containing the profile that corresponds to nIndex. Undefined is returned otherwise.

Example

Enumerate through all of the profiles in Preflight.

var num = Preflight.getNumProfiles(app.thermometer);

for( i= 0; i< num; ++i)

{

   var oProfile = Preflight.getNthProfile(i);

   console.println("-----------------------------------------");

   console.println("Name: " + oProfile.name);

   console.println("Comment: " + oProfile.description);

   console.println("HasFixups: " + oProfile.hasFixups);

   console.println("HasChecks: " + oProfile.hasChecks);

   console.println("-----------------------------------------");

}

getNumProfiles

9.0

 

 

P

Retrieves the number of installed Preflight profiles.

Parameters

oThermometer

(optional) Shows the status window and the progress bar that indicates to the user that a lengthy operation is in progress. To acquire a Thermometer object, use app.thermometer. If oThermometer is not specified, no progress is shown.

Returns

The number of installed Preflight profiles.

getProfileByName

9.0

 

 

P

Retrieves the Preflight profile with a specific name from the list of installed Preflight profiles.

Parameters

cName 

The name of the profile to be obtained.

oThermometer

(optional) Shows the status window and the progress bar that indicates to the user that a lengthy operation is in progress. To acquire a Thermometer object, use app.thermometer. If oThermometer is not specified, no progress is shown.

Returns

A PreflightProfile object if a profile with the specified name exists. Undefined is returned otherwise.

Example

Get a profile with the name “Magazine Ads”.

var oProfile = Preflight.getProfileByName("Magazine Ads");

if( oProfile != undefined) {

   console.println("-----------------------------------------");

   console.println("Name: " + oProfile.name);

   console.println("Comment: " + oProfile.description);

   console.println("HasFixups: " + oProfile.hasFixups);

   console.println("HasChecks: " + oProfile.hasChecks);

   console.println("-----------------------------------------");

}

getProfileByFingerPrint

9.0

 

 

P

Retrieves the Preflight profile with a specific fingerprint of the audit trail. The fingerprint can be acquired from the doc.getPreflightAuditTrail method.

Parameters

cFingerPrint 

The fingerprint of the profile to be obtained.

oThermometer

(optional) Shows the status window and the progress bar that indicates to the user that a lengthy operation is in progress. To acquire a Thermometer object, use app.thermometer. If oThermometer is not specified, no progress is shown.

Returns

A PreflightProfile object if a profile with the specified fingerprint exists. Undefined is returned otherwise.

Example

Get a profile from the audit trail.

var oAuditTrail = this.getPreflightAuditTrail();

var oProfile = Preflight.getProfileByFingerPrint(oAuditTrail.profile_fingerprint);

if( oProfile != undefined) {

   console.println("-----------------------------------------");

   console.println("Name: " + oProfile.name);

   console.println("Comment: " + oProfile.description);

   console.println("HasFixups: " + oProfile.hasFixups);

   console.println("HasChecks: " + oProfile.hasChecks);

   console.println("-----------------------------------------");

}