You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2014/10/11 00:24:34 UTC
[jira] [Closed] (PDFBOX-115) loosing about 2mm on left when
printing
[ https://issues.apache.org/jira/browse/PDFBOX-115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Hewson closed PDFBOX-115.
------------------------------
Resolution: Cannot Reproduce
I suspect this is fixed now, at least in 2.0, but there's no way to know.
> loosing about 2mm on left when printing
> ---------------------------------------
>
> Key: PDFBOX-115
> URL: https://issues.apache.org/jira/browse/PDFBOX-115
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
>
> [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();
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)