1. AC Question's Avatar
    I try to create a print job and use my own default print option for example I want to set paper size as A6, below is my code, but the result is print option paper size is still Letter as default.
    PrintManager printManager = (PrintManager) context.getSystemService(Context.PRINT_SERVICE);
    String jobName = PdfFragment.sProjectPrefix + " " + getFileNameFromPath(mPdfDocumentName);
    PrintAttributes pdfPrintAttrs = new PrintAttributes.Builder().
    setColorMode(PrintAttributes.COLOR_MODE_MONOCHROME).
    setMediaSize(PrintAttributes.MediaSize.ISO_A6).
    setMinMargins(PrintAttributes.Margins.NO_MARGINS).
    build();
    printManager.print(jobName, new PdfFragmentPrintDocumentAdapter(), pdfPrintAttrs);
    03-07-2017 09:02 PM

Similar Threads

  1. Replies: 9
    Last Post: 12-02-2018, 12:31 PM
  2. Replies: 1
    Last Post: 03-08-2017, 11:59 AM
  3. Can not send pictures through messaging app
    By AC Question in forum Ask a Question
    Replies: 1
    Last Post: 03-07-2017, 11:14 PM
  4. phone not switching on
    By AC Question in forum Ask a Question
    Replies: 1
    Last Post: 03-07-2017, 11:12 PM
  5. why isnt my sd card not mounting?
    By AC Question in forum Ask a Question
    Replies: 1
    Last Post: 03-07-2017, 09:17 PM
LINK TO POST COPIED TO CLIPBOARD