I created a small Javafx application that allows the user to print a node. I want the margin to be zero. I used the following code below, but it didn't work.
printer = javafx.print.Printer.getDefaultPrinter();
pageLayout = printer.createPageLayout(Paper.JAPANESE_POSTCARD, PageOrientation.PORTRAIT, 0.0f, 0.0f, 0.0f, 0.0f);
According to the documentation, the last four parameters in createPageLayout
is the margins(Left,Right,Top,Bottom). I made a print-test but there still a 0.5 inch margin
in the printed document.
What's going on? Any Idea?