Run Acrobat Preflight by Javascript

Post Reply
compendio
Member
Posts: 22
Joined: Tue Feb 28, 2012 9:45 am

Run Acrobat Preflight by Javascript

Post by compendio »

I have to temporary fix a font embedding issue what happen for an PDF created with the Word configurator in Switch and a Pitstop 12 action list to embed the font subgroups. The document will be shown with empty pages on IOS devices and the preview on OSX will show a corrupted text.

I figured out that the Acrobat XI font embedding preflight will solve my issue.



To fix the issue, I'll add an Acrobat preflight to the flow.



I found some parts in the Acrobat help and it seams to be that the preflight profile will be found. The script will be executed in the command section of the Acrobat configurator.



if(($error == null) && ($doc != null))

{

try

{

var oProfile = Preflight.getProfileByName("Schriften einbetten")



if( oProfile != undefined )

{

var myPreflightResult = this.preflight( oProfile);

if( myPreflightResult.numErrors > 0 ) {

console.println( "Preflight found " + myPreflightResult.numErrors + " Errors.");

} else {

console.println( "Preflight found no Errors.");

}

}

}

catch(theError)

{

$error = theError;

$doc.closeDoc( {bNoSave : true} );

}

}



If I run the preflight interactivly, the font embedding(subgroups) is correct. Running the script above will not change the font embedding. Does anybody have expericene in running preflights from scripts in Switch 12?



Thanks,

Thomas
compendio
Member
Posts: 22
Joined: Tue Feb 28, 2012 9:45 am

Run Acrobat Preflight by Javascript

Post by compendio »

Found the reason:

this.preflight has to be replaced with $doc.preflight



The font embedding is fixed at the moment. I have to check the issue with Enfocus, it seams to be that the font subgroups are embedded in a different way as e.g. Acrobat does.
Post Reply