The below code creates a PrintAttributes what I really need to do is obtain the current PrintAttributes
B4X:
Sub CreatePrinterAttributes As JavaObject
Dim builder As JavaObject
builder.InitializeNewInstance("android.print.PrintAttributes.Builder", Null)
Dim mediaSize As JavaObject
mediaSize = mediaSize.InitializeStatic("android.print.PrintAttributes.MediaSize").GetField("ISO_A6")
Return builder.RunMethod("build", Null)
End Sub
According to the documentation getMinMargins should give me the minimal margins
B4X:
These margins are physically imposed by the printer and they are not rotated, i.e. they are the same for both portrait and landscape. For example, a printer may not be able to print in a stripe on both left and right sides of the page