Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-115

loosing about 2mm on left when printing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • None
    • None
    • PDModel
    • None

    Description

      [imported from SourceForge]
      http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1391471
      Originally submitted by nobody on 2005-12-27 13:15.

      Using the following code, see "onstaff.pdf"

      Ben

      documentCatalog = PDDocument.load
      (fileName).getDocumentCatalog();
      pageCount = (int)documentCatalog.getPages
      ().getCount();
      PDPage page = (PDPage)
      documentCatalog.getAllPages().get(0);
      PDRectangle mediaBox = page.findMediaBox();
      format = new PageFormat();
      Paper paper = new Paper();
      paper.setImageableArea(
      0,0,mediaBox.getWidth(),mediaBox.getHeight());
      paper.setSize( mediaBox.getWidth(),
      mediaBox.getHeight() );
      format.setPaper( paper );
      format.setOrientation(PageFormat.PORTRAIT);

      PrinterJob pj = PrinterJob.getPrinterJob();

      PrintService pService = null;
      PrintService[] pservices = null;
      pservices = PrinterJob.lookupPrintServices
      ();
      }
      for(int i=0; i<pservices.length && pservices !
      = null; i++)
      if(pservices[i].getName().equalsIgnoreCase
      ("HP"))

      { pService = pservices[i]; break; }

      pj.setPageable(this);
      pj.setPrintService(pService);
      pj.print();

      Attachments

        Activity

          People

            Unassigned Unassigned
            Anonymous Anonymous
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: