Hi, > Am 21.05.2015 um 08:45 schrieb Gregor Kovač <[email protected]>: > > Hi! > > That is why I'm printing on a physical printer. I'm also testing a Zebra, I > think it is a ZM400. The label I'm printing via PDF is 50mmx40mm. The PDF > look OK, but when Zebra prints it out it looks all pixelated. Maybe I can > do something on the printer. I'll see.
you could try using a different printer resolution as the ZM400 support 203, 300 and 600 DPI. e.g. printRequestAttributeSet.add(new PrinterResolution(300, 300, PrinterResolution.DPI)); BR Maruan > > Best regards, > Kovi > > 2015-05-21 1:54 GMT+02:00 John Hewson <[email protected]>: > >> >>> On 20 May 2015, at 14:56, Gregor Kovač <[email protected]> wrote: >>> >>> Hi! >>> >>> You don't have to open anything, since the 5th line from bottom is a >>> picture. Well, at least it looks like it when I open the original file >> in a >>> PDF viewer. >> >> Yes it's a picture, but it shouldn't be there at all- at least, it's not >> there in Acrobat. >> >>> About the quality I'll have to investigate further, since my printer >> gets a >>> nasty error when I try to print on it. It I just send the pdf to it via >> lpr >>> program then it prints fine. >> >> Do be aware that virtual printer drivers will never quite be the same as >> printing on a physical printer. >> >> -- John >>> Best regards, >>> Gregor >>> >>> 2015-05-20 21:58 GMT+02:00 John Hewson <[email protected]>: >>> >>>> Hi, >>>> >>>>> On 20 May 2015, at 07:05, Gregor Kovač <[email protected]> wrote: >>>>> >>>>> Hi! >>>>> >>>>> I'm using PDFBOX 2.0 (updated subversion today) and this code to print: >>>>> >>>>> private static void printWithPDFBox2(File pdfFile, int copies) { >>>>> PDDocument document = null; >>>>> >>>>> try { >>>>> document = PDDocument.load(pdfFile); >>>>> >>>>> PrinterJob printJob = PrinterJob.getPrinterJob(); >>>>> printJob.setJobName(pdfFile.getName()); >>>> >> printJob.setPrintService(PrintServiceLookup.lookupDefaultPrintService()); >>>>> >>>>> printJob.setCopies(copies); >>>>> HashPrintRequestAttributeSet printRequestAttributeSet = >>>>> new HashPrintRequestAttributeSet(); >>>>> printRequestAttributeSet.add(new Copies(copies)); >>>>> printRequestAttributeSet.add(SheetCollate.COLLATED); >>>>> PDFPrinter printer = new PDFPrinter(document, >>>>> Scaling.ACTUAL_SIZE, Orientation.PORTRAIT); >>>>> printer.print(printJob, printRequestAttributeSet); >>>>> } catch (Exception e) { >>>>> e.printStackTrace(); >>>>> } finally { >>>>> if (document != null) { >>>>> try { >>>>> document.close(); >>>>> } catch (Exception e) { >>>>> e.printStackTrace(); >>>>> } >>>>> } >>>>> } >>>>> } >>>>> >>>>> Original PDF is located at: >>>>> >> https://drive.google.com/open?id=0B-qoYfDTAZ8QNkpINC1oZjFvbDg&authuser=0 >>>>> What gets printed out is located at: >>>>> >> https://drive.google.com/open?id=0B-qoYfDTAZ8QdmFlOVg0M2NFam8&authuser=0 >>>>> >>>>> Why this quality degradation (as if fonts are not antialiased)? Even >>>>> setting dpi to 500 doesn't make it better. >>>> >>>> The PostScript file which you’ve linked to as the output looks fine. The >>>> fonts are all vector >>>> outlines. I see no pixilation. I suspect this is an issue with your >>>> PostScript viewer. Try >>>> zooming in further. >>>> >>>> I do see one issue which is that there’s an extra line of text in the >>>> PDFBox version when >>>> compared with Acrobat, that text is embedded as an image and is the 5th >>>> line from the >>>> bottom of the page. I’m not sure why that is, but we could open a JIRA >>>> issue for it. >>>> >>>> — John >>>> >>>>> Best regards, >>>>> Kovi >>>>> >>>>> -- >>>>> -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ >>>>> | In A World Without Fences Who Needs Gates? | >>>>> | Experience Linux. | >>>>> -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [email protected] >>>> For additional commands, e-mail: [email protected] >>> >>> >>> -- >>> -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ >>> | In A World Without Fences Who Needs Gates? | >>> | Experience Linux. | >>> -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > > -- > -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ > | In A World Without Fences Who Needs Gates? | > | Experience Linux. | > -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

