+ void setupPDF(int width, int height, String title)
+ {
+ boolean accurateText = true;
+
+ // String renderStyle = jalview.bin.Cache.getDefault("EPS_RENDERING",
+ // "Prompt each time");
+ //
+ // // If we need to prompt, and if the GUI is visible then
+ // // Prompt for EPS rendering style
+ // if (renderStyle.equalsIgnoreCase("Prompt each time")
+ // && !(System.getProperty("java.awt.headless") != null && System
+ // .getProperty("java.awt.headless").equals("true")))
+ // {
+ // EPSOptions eps = new EPSOptions();
+ // renderStyle = eps.getValue();
+ //
+ // if (renderStyle == null || eps.cancelled)
+ // {
+ // setProgressMessage(MessageManager.formatMessage(
+ // "status.cancelled_image_export_operation", "EPS"));
+ // return;
+ // }
+ // }
+ //
+ // if (renderStyle.equalsIgnoreCase("text"))
+ // {
+ // accurateText = false;
+ // }
+
+ try
+ {
+ pdfjob = new PDFJob(out, title);
+
+ Paper paper = new Paper();
+ paper.setSize(width, height);
+ PageFormat pf = new PageFormat();
+ pf.setPaper(paper);
+ graphics = pdfjob.getGraphics(pf);
+ setProgressMessage(MessageManager
+ .formatMessage("status.export_complete", type.getName()));
+ } catch (Exception ex)
+ {
+ }
+ }