Auf Thema antworten

Hm - also printJob ist immer noch "Java Printing"

 

[code]     try {

           // Standard Drucker

           PrintService defaultPrintService = PrintServiceLookup

               .lookupDefaultPrintService();


           // Create the print job

           FileInputStream myPicture = new FileInputStream(printStorage.getStorageAttachment().getFullPath());

           DocFlavor formatSTREAM = DocFlavor.INPUT_STREAM.JPEG;


           PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();

          aset.add(new JobName("Test.jpg", Locale.getDefault()));

        

           DocAttributeSet dset = new HashDocAttributeSet();

          dset.add(new DocumentName("Test.jpg", Locale.getDefault()));

        

           DocPrintJob printJob = defaultPrintService.createPrintJob();

           Doc doc = new SimpleDoc(myPicture, formatSTREAM, dset);

        

           // Drucken

           printJob.print(doc, aset);[/code]



Oben