Toolbar in PDF and IMG Export

Hi,

I followed the script example from this article “https://www.dundas.com/Support/developer/script-library/export/create-an-image-export” to export IMG and PDF using JavaScript.

I got the toolbar(see attached screenshot) from the IMG and PDF export using the script. However, if I export the dashboard with native export function, the export won’t have the toolbar. So is it possible to get rid of the toolbar from my export?

The script I am using.
/ Get the export service.
var exportService = this.getService(‘ExportService’);
// Get the view service.
var viewService = this.getService(‘ViewService’);
// Get the web app service.
var webAppService = this.getService(‘WebAppService’);
// Create the export request.
var exportRequest =
new dundas.export.ExportRequest(
{
isLegacyExport: true,
providerId: dundas.constants.STANDARD_IMAGE_EXPORT_PROVIDER_ID,
viewId: this.parentView.id,
viewData: this.getService(“CanvasService”).canvas.viewModel.businessObject.control
});
// Get the perform export promise.
var exportPromise =
exportService.performExport(exportRequest);
// Setup a loading dialog.
viewService.showLoadingRestCall(exportPromise);
exportPromise.done(
function(exportId)
{
// Get the Url for the export file.
var exportFileUrl =
webAppService.getExportResultUrl(exportId);
// Force the browser to download the file.
window.location.replace(exportFileUrl);
}
);

Hi,

In order to export the dashboard as an image without the toolbar, using the same script, set the initial view options of the dashboard property to ‘Show only a simple viewer’.

forumScreenshot

Hope this helps.

1 Like