private string adobepdfprint = "adobe pdf";
private string adobedisprint = "acrobat distiller";
private string regroot = "software//adobe//acrobat distiller//";
private string printerfilename = "acrodist.exe";
private string regname = "installpath";
///
/// 獲取acrodist.exe的安裝路徑
///
///
private string getadobedisfilepath()
.0", regroot, i);
acrodistkey = regkey.opensubkey(regrootversion);
if (acrodistkey != null)}}
throw new exception("acrobat distiller printer not found!");
}///
/// 獲取adobe printer
/// "adobe pdf" 或 "acrobat distiller"
///
///
private string getadobeprinter()
}return string.empty;
}public void convertword2pdf(string sourcefile)
", sourcefile));
string strdir = path.getdirectoryname(sourcefile);
string strname = path.getfilenamewithoutextension(sourcefile);
string adobeprinter = getadobeprinter();
// prn裝pdf
process objprocess = new process();
objprocess.startinfo.createnowindow = true;
objprocess.startinfo.useshellexecute = false;
objprocess.startinfo.filename = getadobedisfilepath();
objprocess.startinfo.arguments = prnfile;
start = datetime.now;
end = start.addseconds(20);
objprocess.start();
objprocess.closemainwindow();
//if (file.exists(prnfile))
///*
acrodistxlib.pdfdistiller pdfdis = new acrodistxlib.pdfdistiller();
Office文件,pdf文件轉swf
以下操作的環境,ubuntu server版本,64位 openoffice swftools 先檢視操作是多少位的,然後去相應的jdk,和tomcat,最少是jdk6以上的版本 將jdk和tomcat解壓 開啟 etc environment 檔案 在path後面新增配置資訊 在path最後加上乙...
用C 實現生成PDF文件
using system using system.io using system.text using system.collections namespace pdfgenerator public static string xrefformatting long xvalue return ...
使用pdfbox實現pdf轉image
使用soffice的命令把pdf轉image的話,預設只能轉一頁的,這個有點費勁,於是也不打算沿用soffice的方案了,改用pdfbox來實現。org.apache.pdfbox pdfbox 2.0.4 org.apache.pdfbox pdfbox tools 2.0.4 public st...