printer.dispose();
}
public static void printDialog(Shell shell, Document doc, String url,
NamespaceHandler nsh, String jobName) {
PrintDialog dlg = new PrintDialog(shell);
dlg.setText(jobName);
PrinterData data = dlg.open();
if (data != null) {
print(data, doc, url, nsh, jobName);
}
}