|
60 | 60 | import javax.swing.AbstractAction; |
61 | 61 | import javax.swing.Action; |
62 | 62 | import javax.swing.Box; |
| 63 | +import javax.swing.JCheckBoxMenuItem; |
63 | 64 | import javax.swing.JComponent; |
64 | 65 | import javax.swing.JDialog; |
65 | 66 | import javax.swing.JEditorPane; |
@@ -194,6 +195,7 @@ public class PDFDebugger extends JFrame implements Callable<Integer>, HyperlinkL |
194 | 195 | private JMenuItem saveAsMenuItem; |
195 | 196 | private JMenu recentFilesMenu; |
196 | 197 | private JMenuItem printMenuItem; |
| 198 | + private JCheckBoxMenuItem printBorder; |
197 | 199 | private JMenuItem reopenMenuItem; |
198 | 200 |
|
199 | 201 | // edit > find menu |
@@ -592,6 +594,10 @@ private JMenu createFileMenu() |
592 | 594 | fileMenu.addSeparator(); |
593 | 595 | fileMenu.add(printMenuItem); |
594 | 596 | fileMenu.add(PrintDpiMenu.getInstance().getMenu()); |
| 597 | + |
| 598 | + printBorder = new JCheckBoxMenuItem("Print border"); |
| 599 | + printBorder.setEnabled(true); |
| 600 | + fileMenu.add(printBorder); |
595 | 601 |
|
596 | 602 | if (!IS_MAC_OS) |
597 | 603 | { |
@@ -1334,7 +1340,7 @@ private void printMenuItemActionPerformed(ActionEvent evt) |
1334 | 1340 | try |
1335 | 1341 | { |
1336 | 1342 | PrinterJob job = PrinterJob.getPrinterJob(); |
1337 | | - job.setPageable(new PDFPageable(document, Orientation.AUTO, false, PrintDpiMenu.getDpiSelection())); |
| 1343 | + job.setPageable(new PDFPageable(document, Orientation.AUTO, printBorder.isSelected(), PrintDpiMenu.getDpiSelection())); |
1338 | 1344 | PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet(); |
1339 | 1345 | PDViewerPreferences vp = document.getDocumentCatalog().getViewerPreferences(); |
1340 | 1346 | if (vp != null && vp.getDuplex() != null) |
|
0 commit comments