1¡¢Ê×ÏȰ²×° Microsoft Office 2007¼ÓÔØÏMicrosoft Save as PDF-¼òÌåÖÐÎİ棺ÏÂÔØµØÖ·£º
http://download.microsoft.com/download/3/8/8/388812b2-0d3f-474e-a7ef-b095d3d0d3cd/SaveAsPDF.exe
2¡¢Ð½¨ÍøÕ¾ÏîÄ¿£¬Ìí¼ÓMicrosoft.Office.Interop.WordµÄÒýÓÃ
3¡¢´úÂ룺
/// <summary>
/// ת»»wordΪpdf
/// </summary>
/// <param name="filename">docÎļþ·¾¶</param>
/// <param name="savefilename">pdf±£´æÂ·¾¶</param>
private void ConvertWordPDF1(object filename, object savefilename)
{
Object Nothing = System.Reflection.Missing.Value;
//´´½¨Ò»¸öÃûΪWordAppµÄ×é¼þ¶ÔÏó
Microsoft.Office.Interop.Word.Application wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
//´´½¨Ò»¸öÃûΪWordDocµÄÎĵµ¶ÔÏó²¢´ò¿ª
Microsoft.Office.Interop.Word.Document doc = wordApp.Documents.Open(ref filename, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing);
//ÉèÖñ£´æµÄ¸ñʽ
object filefarmat = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatPDF;
//±£´æÎªPDF
doc.SaveAs(ref savefilename, ref filefarmat, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing);
//¹Ø±ÕÎĵµ¶ÔÏó
doc.Close(ref Nothing, ref Nothing, ref Nothing);
//ÍÆ³ö×齨
wordApp.Quit(ref Nothing, ref Nothing, ref Nothing);
}
object filefarmat = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatPDF;//ÉèÖñ£´æµÄ¸ñʽ£¬»¹¿ÉÒÔΪÒÔϸñʽ£º
Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatHTML //±£´æÎªHTML
Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatRTF //±£´æÎªRTF
Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatText //±£´æÎªÎı¾
Micros
ASP.NETµÄ¹Ø¼üÄ¿±êÖ®Ò»ÊÇ´´½¨Ò»ÖÖÈÿª·¢ÈËÔ±Äܹ»ÏñWindowsÓ¦ÓóÌÐò¿ª·¢Õß¶¨ÖÆ×ÀÃæÓ¦ÓóÌÐòÄÇÑùµÄ¿ìËÙ¶¨ÖÆWeb FormsµÄģʽ¡£µ±È»WebÓ¦ÓóÌÐòÓ봫ͳ¸»¿Í»§¶ËÓ¦ÓóÌÐòÓкܴóµÄ²»Í¬£¬ÒªÊµÏÖÕâÖÖģʽÓÐÁ½¸ö¹Ø¼üµÄÕϰ¡£
1.WebÓ¦ÓóÌÐòÊÇÔÚ·þÎñÆ÷¶ËÖ´ÐеģºÀýÈ磬¼ÙÉè´´½¨Ò»¸ ......