public class CustomPaperSize extends PaperSize
paper = new CustomPaperSize("Business Card", 90, 55, Unit.MM);
|Constructor and Description|
Create a PaperSize constant (or, at least, once you've created one you don't need to create any more) for a custom size.
public CustomPaperSize(String name, double width, double height, Unit units)
height parameters are in terms
units, obviously. Note that you must use a physical
measurement; you can't specify pixels.
You need to specify a human readable display name describing this
PaperSize in a word or two. You should mark it for translation. Try
"Custom" if you're lacking for inspiration.