“PrinterException: Paper's imageable width is too small” I can see what's wrong, but how can I fix it?

◇◆丶佛笑我妖孽 提交于 2019-11-29 17:28:07
yetihehe

I had the same problem with Dymo 420P.

Try setting imageable area to the same size as paper and origin 0,0. Then after PrinterJob.printDialog(), call PrinterJob.validatePage() with your pageformat. It will return valid pageformat with proper imageable area.

i solve it adding

    PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();

    aset.add(OrientationRequested.PORTRAIT);
    aset.add(MediaSizeName.INVOICE);


        job.print( aset);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!