Q: Wrong Margin with Printer Brother QL-560 using java I've a margin problem with the Brother QL-560 using java.
I've already tested either the xhtml-printable 
and the pdf-renderer solutions. 
Using the xhtml-printable solution, even if the top-left corner of the imageable area is set to x=0 and y=0, the content is printed with a certain amount of left and top margins (either in PORTRAIT and LANDSCAPE mode). 
Here the result:

The black border has been inserted to underline the margin problem. 
The java code used to print is the same showed in this post, but converted in Java.
Using the second solution, I've a problem with the PDF file generation from the XHTML code. Specifically, first I generate a PDF file using the iText library, then I load and print this file using the PDF Renderer library (through the PDFPrintPage class, calling the "print" method). In this case, the size of the generated page is too big and the content go outside of the paper.
Can you describe with details the complete code (either XHTML) that you used to print?
Thanks in advance.
______________ UPDATE _________________________
So, I set: labelPaper.setImageableArea(+50,+50,paperWidth, paperHeight); .
The result is here:

Why??? I put plus values... +50 (x) and +50 (y)...maybe why I used PORTRAIT?
This is my code:
public void print(PrintService service){

        try{
            float paperWidth = 62.0f;
            float paperHeight = 62.0f;
            paperWidth *= 2.83;
            paperHeight *= 2.83;

            //val printJob = PrinterJob.getPrinterJob
            PrinterJob printJob = PrinterJob.getPrinterJob();
            printJob.setPrintService(service);

            PageFormat pageFormat = printJob.defaultPage();
            pageFormat.setOrientation(PageFormat.PORTRAIT);
            Paper labelPaper = pageFormat.getPaper();
            labelPaper.setSize(paperWidth, paperHeight);
            labelPaper.setImageableArea(+50,+50,paperWidth, paperHeight);
            pageFormat.setPaper(labelPaper);

            Book book = new Book();
            book.append(this.createRender(), pageFormat);
            printJob.setPageable(book);

            PrintRequestAttributeSet attributeSet = new HashPrintRequestAttributeSet();
            attributeSet.add(new PrinterResolution(300, 300, ResolutionSyntax.DPI));
            printJob.print(attributeSet);

I have a little margin, too...why? I'd want 0x & 0y offset.
