how to change scale bar unit from miles to feet using print widget

Discussion created by ldai@bergmannpc.com on Jan 29, 2014
Latest reply on Oct 3, 2014 by jbcbirder
Hi, All,
What I did is using the print widget in the ArcGIS JavaScript Api to execute the map export to pdf.
But the issue is when I change the scale bar unit from default one (miles) to feet. Only the unit label changed but the number on the scale bar did not change along with the unit change.

I also test the scale bar unit change in an online sample http://developers.arcgis.com/javascript/samples/widget_print_webmap/

This is what I did.
var templates = new esri.tasks.PrintParameters;
    templates = [{
        label: "Layout-Landscape",
        format: "pdf",
        layout: "A4 Landscape",
        layoutOptions: {
            titleText: "Default Title",
            authorText: "NOTE:",
            scaleBarOptions: {
                metricUnit: "meters",
                metricLabel: "m",
                nonMetricUnit: "feet",
                nonMetricLabel: "ft"
            scalebarUnit: "Feet"
        exportOptions: {
            dpi: 96

    // create the print dijit       
    printer = new esri.dijit.Print({
        "map": map,
        "templates": templates,
        url: ConfigPrintUrl
    }, dojo.byId("print_button"));

But it only change the unit label from miles to feet, not the real number on the scale bar.
Any one knows any solution?
Thank you very much.