|
@@ -69,8 +69,12 @@ public class PrintTools {
|
|
|
// Start a print job, passing in a PrintDocumentAdapter implementation
|
|
|
// to handle the generation of a print document
|
|
|
try {
|
|
|
+ PrintAttributes.Builder builder = new PrintAttributes.Builder();
|
|
|
+ PrintAttributes.MediaSize mediaSize = PrintAttributes.MediaSize.ISO_A3;
|
|
|
+ builder.setMediaSize(mediaSize.asLandscape());
|
|
|
+
|
|
|
android.print.PrintJob job = printManager.print(jobName, new MyPrintDocumentAdapter(context),
|
|
|
- new PrintAttributes.Builder().build());
|
|
|
+ builder.build());
|
|
|
if (job == null) {
|
|
|
Toast.makeText(context, "print failed!", Toast.LENGTH_SHORT).show();
|
|
|
return;
|