用Java代碼打印PDF
來源:易賢網(wǎng) 閱讀:3851 次 日期:2015-04-10 14:47:54
溫馨提示:易賢網(wǎng)小編為您整理了“用Java代碼打印PDF”,方便廣大網(wǎng)友查閱!

1、工具類庫

類庫名:Apache PDFBox

軟件首頁:

說明:此類庫由Apache軟件基金會提供,使用Apache License 2.0,開源免費。

2、使用此類庫打印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});

}

}

更多信息請查看IT技術專欄

更多信息請查看網(wǎng)絡編程
易賢網(wǎng)手機網(wǎng)站地址:用Java代碼打印PDF
關于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點

版權所有:易賢網(wǎng)