Unfortunately I have no way of knowing what the width would be, so I set the constrainProportions to true. I did think setting the width might be necessary so I set it for a test on one I know the width and it still didn't work for me.
The width works for me.
aaa("~/Desktop/Untitled-2.ai");
function aaa (filePath) {
var idopen = stringIDToTypeID( "open" );
var desc10 = new ActionDescriptor();
var idas = stringIDToTypeID( "as" );
var desc11 = new ActionDescriptor();
/*var idname = stringIDToTypeID( "name" );
desc11.putString( idname, """Untitled-1.ai""" );*/
var idcrop = stringIDToTypeID( "crop" );
var idcropTo = stringIDToTypeID( "cropTo" );
var idtrimBox = stringIDToTypeID( "trimBox" );
desc11.putEnumerated( idcrop, idcropTo, idtrimBox );
var idresolution = stringIDToTypeID( "resolution" );
var iddensityUnit = stringIDToTypeID( "densityUnit" );
desc11.putUnitDouble( idresolution, iddensityUnit, 300.000000 );
var idmode = stringIDToTypeID( "mode" );
var idcolorSpace = stringIDToTypeID( "colorSpace" );
var iduseICCProfile = stringIDToTypeID( "useICCProfile" );
desc11.putEnumerated( idmode, idcolorSpace, iduseICCProfile );
var iddepth = stringIDToTypeID( "depth" );
desc11.putInteger( iddepth, 8 );
var idantiAlias = stringIDToTypeID( "antiAlias" );
desc11.putBoolean( idantiAlias, true );
var idwidth = stringIDToTypeID( "width" );
var idpixelsUnit = stringIDToTypeID( "pixelsUnit" );
desc11.putUnitDouble( idwidth, idpixelsUnit, 71.000000 );
var idheight = stringIDToTypeID( "height" );
var idpixelsUnit = stringIDToTypeID( "pixelsUnit" );
desc11.putUnitDouble( idheight, idpixelsUnit, 50.000000 );
var idconstrainProportions = stringIDToTypeID( "constrainProportions" );
desc11.putBoolean( idconstrainProportions, true );
var idsuppressWarnings = stringIDToTypeID( "suppressWarnings" );
desc11.putBoolean( idsuppressWarnings, false );
var idreverse = stringIDToTypeID( "reverse" );
desc11.putBoolean( idreverse, true );
var idselection = stringIDToTypeID( "selection" );
var idpdfSelection = stringIDToTypeID( "pdfSelection" );
var idpage = stringIDToTypeID( "page" );
desc11.putEnumerated( idselection, idpdfSelection, idpage );
var idpageNumber = stringIDToTypeID( "pageNumber" );
desc11.putInteger( idpageNumber, 1 );
var idPDFGenericFormat = stringIDToTypeID( "PDFGenericFormat" );
desc10.putObject( idas, idPDFGenericFormat, desc11 );
var idnull = stringIDToTypeID( "null" );
desc10.putPath( idnull, new File( filePath ) );
executeAction( idopen, desc10, DialogModes.NO );
};