Orient

Introduction

try {
    // Set up the attribute set
    PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
    if (portrait) {
        aset.add(ationRequested.PORTRAIT);
    } else {
        aset.add(ationRequested.LANDSCAPE);
    }

    // Print it
    job.print(doc, aset);
} catch (PrintException e) {
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.