1、工具類(lèi)庫(kù)
類(lèi)庫(kù)名:Apache PDFBox
軟件首頁(yè):
說(shuō)明:此類(lèi)庫(kù)由Apache軟件基金會(huì)提供,使用Apache License 2.0,開(kāi)源免費(fèi)。
2、使用此類(lèi)庫(kù)打印pdf文件的代碼示例
package com.why.test.pdf;
import org.apache.pdfbox.PrintPDF;
public class PrintPFDWithJava {
public static void main(String[] args) throws Exception {
//pdf文件全路經(jīng)
String pdfPath = "E:\20_tmp\aaa.pdf";
//--silentPrint:靜默打印
PrintPDF.main(new String[]{"-silentPrint",pdfPath});
}
}
更多信息請(qǐng)查看IT技術(shù)專(zhuān)欄