Page 1 of 1

Run Acrobat Preflight by Javascript

Posted: Sun Aug 24, 2014 1:08 pm
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

Run Acrobat Preflight by Javascript

Posted: Wed Aug 27, 2014 9:11 pm
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.