• 大小: 3.12MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-10
  • 语言: C#
  • 标签:

资源简介

仿百度文库C#版本 效果可以去https://www.ftcourt.gov.cn/cpwspt/writview.aspx?id=41578 查看!

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace FFWS.BLL.Open
{
    public class NewsCount
    {
        //Word转换成pdf
        /// 
        /// 把Word文件转换成为PDF格式文件
        /// 

        /// 源文件路径
        /// 目标文件路径 
        /// true=转换成功
        public static bool DOCConvertToPDF(string sourcePath string targetPath)
        {

            if (File.Exists(targetPath))
            {
                return true;
            }
            bool result = false;
            Microsoft.Office.Interop.Word.WdExportFormat exportFormat = Microsoft.Office.Interop.Word.WdExportFormat.wdExportFormatPDF;
            object paramMissing = Type.Missing;
            Microsoft.Office.Interop.Word.Application wordApplication = new Microsoft.Office.Interop.Word.Application();
            Microsoft.Office.Interop.Word.Document wordDocument = null;
            try
            {
                object paramSourceDocPath = sourcePath;
                string paramExportFilePath = targetPath;
                Microsoft.Office.Interop.Word.WdExportFormat paramExportFormat = exportFormat;
                bool paramOpenAfterExport = false;
                Microsoft.Office.Interop.Word.WdExportOptimizeFor paramExportOptimizeFor = Microsoft.Office.Interop.Word.WdExportOptimizeFor.wdExportOptimizeForPrint;
                Microsoft.Office.Interop.Word.WdExportRange paramExportRange = Microsoft.Office.Interop.Word.WdExportRange.wdExportAllDocument;
                int paramStartPage = 0;
                int paramEndPage = 0;
                Microsoft.Office.Interop.Word.WdExportItem paramExportItem = Microsoft.Office.Interop.Word.WdExportItem.wdExportDocumentContent;
                bool paramIncludeDocProps = true;
                bool paramKeepIRM = true;
                Microsoft.Office.Interop.Word.WdExportCreateBookmarks paramCreateBookmarks = Microsoft.Office.Interop.Word.WdExportCreateBookmarks.wdExportCreateWordBookmarks;
                bool paramDocStructureTags = true;
                bool paramBitmapMissingFonts = true;
                bool paramUseISO19005_1 = false;
                wordDocument = wordApplication.Documents.Open(
                ref paramSourceDocPath ref paramMissing ref paramMissing
                ref paramMissing ref paramMissing ref paramMissing
                ref paramMissing ref paramMissing ref paramMissing
                ref paramMissing ref paramMissing ref paramMissing
                ref paramMissing ref paramMissing ref paramMissing
                ref paramMissing);
                if (wordDocument != null)
                    wordDocument.ExportAsFixedFormat(paramExportFilePath
                    paramExportFormat paramOpenAfterExport
                    paramExportOptimizeFor paramExportRange pa

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-05-16 15:36  仿百度控件效果1\
     目录           0  2014-05-16 14:51  仿百度控件效果1\FlexPaper\
     文件      570734  2014-03-28 20:33  仿百度控件效果1\FlexPaper\FlexPaperViewer.swf
     目录           0  2014-05-16 14:51  仿百度控件效果1\FlexPaper\js\
     文件       10271  2014-03-28 20:33  仿百度控件效果1\FlexPaper\js\flexpaper_flash.js
     文件       11332  2014-03-28 20:33  仿百度控件效果1\FlexPaper\js\flexpaper_flash_debug.js
     文件       91342  2014-03-28 20:33  仿百度控件效果1\FlexPaper\js\jquery.js
     文件      539473  2014-03-28 20:33  仿百度控件效果1\FlexPaper\Paper.swf
     文件         657  2014-03-28 20:33  仿百度控件效果1\FlexPaper\playerProductInstall.swf
     文件       13310  2014-03-28 20:33  仿百度控件效果1\NewsCount.cs
     目录           0  2014-05-16 15:08  仿百度控件效果1\pdf\
     文件        5412  2014-03-28 20:33  仿百度控件效果1\pdfToSwf.cs
     目录           0  2014-05-16 15:08  仿百度控件效果1\swf\
     文件        3849  2014-05-16 15:04  仿百度控件效果1\SWF-word权限配置(常见问题包含).txt
     目录           0  2014-05-16 15:36  仿百度控件效果1\SWFTools\
     文件     3630592  2014-03-28 20:33  仿百度控件效果1\SWFTools\pdf2swf.exe
     文件        4895  2014-03-28 20:33  仿百度控件效果1\writview.aspx
     文件        2567  2014-03-28 20:33  仿百度控件效果1\writview.aspx.cs
     文件         101  2014-05-16 15:07  仿百度控件效果1\原理.txt
     文件       54261  2014-05-16 14:53  仿百度控件效果1\效果图1.jpg
     文件      198902  2014-05-16 14:54  仿百度控件效果1\效果图2.jpg

评论

共有 条评论

相关资源