|
@ -11,6 +11,7 @@ import com.win.print.util.PdfPrintUtil; |
|
|
import com.win.print.util.PrinterUtil; |
|
|
import com.win.print.util.PrinterUtil; |
|
|
import com.win.print.util.WinPrintJobListener; |
|
|
import com.win.print.util.WinPrintJobListener; |
|
|
import jakarta.annotation.Resource; |
|
|
import jakarta.annotation.Resource; |
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.pdfbox.pdmodel.PDDocument; |
|
|
import org.apache.pdfbox.pdmodel.PDDocument; |
|
|
import org.apache.pdfbox.printing.PDFPrintable; |
|
|
import org.apache.pdfbox.printing.PDFPrintable; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.Logger; |
|
@ -63,7 +64,9 @@ public class PrintTaskProcesser { |
|
|
PrintRequestAttributeSet printRequestAttribute = printerUtil.getPrintRequestAttribute(printAttribute,"winTask"); |
|
|
PrintRequestAttributeSet printRequestAttribute = printerUtil.getPrintRequestAttribute(printAttribute,"winTask"); |
|
|
if("pdf".equalsIgnoreCase(type)){ |
|
|
if("pdf".equalsIgnoreCase(type)){ |
|
|
PdfPrintUtil pdfPrintUtil=new PdfPrintUtil(); |
|
|
PdfPrintUtil pdfPrintUtil=new PdfPrintUtil(); |
|
|
pdfPrintUtil.print(file,printService,printRequestAttribute); |
|
|
//pdfPrintUtil.print(file,printService,printRequestAttribute);
|
|
|
|
|
|
pdfPrintUtil.print_page(file,printService,printRequestAttribute); |
|
|
|
|
|
|
|
|
}else{ |
|
|
}else{ |
|
|
DocPrintJob pringJobByName = printService.createPrintJob(); |
|
|
DocPrintJob pringJobByName = printService.createPrintJob(); |
|
|
Doc simpleDoc = new SimpleDoc(new FileInputStream(file), getDocFlavor(type), null); |
|
|
Doc simpleDoc = new SimpleDoc(new FileInputStream(file), getDocFlavor(type), null); |
|
|