builder.setWithArrow((Boolean) arrowCheckbox.getValue());
builder.setWithScaleBar((Boolean) scaleBarCheckbox.getValue());
builder.setRasterDpi((Integer) rasterDpiSlider.getValue());
PrintTemplateInfo template = builder.buildTemplate();
request.setTemplate(template);
final GwtCommand command = new GwtCommand(PrintGetTemplateRequest.COMMAND);
command.setCommandRequest(request);
GwtCommandDispatcher.getInstance().execute(command, new AbstractCommandCallback<PrintGetTemplateResponse>() {
public void execute(PrintGetTemplateResponse response) {
stopProgress();
UrlBuilder url = new UrlBuilder(GWT.getHostPageBaseURL());
url.addPath(URL_PATH);
url.addParameter(URL_DOCUMENT_ID, response.getDocumentId());
url.addParameter(URL_NAME, (String) fileNameItem.getValue());
url.addParameter(URL_TOKEN, command.getUserToken());
if (SAVE.equals(downloadTypeGroup.getValue())) {
url.addParameter(URL_DOWNLOAD, URL_DOWNLOAD_YES);
String encodedUrl = url.toString();
// create a hidden iframe to avoid popups ???
HTMLPanel hiddenFrame = new HTMLPanel("<iframe src='" + encodedUrl