当前位置: 首页 > news >正文

网站的软文 怎么做推广网络营销的手段有哪些

网站的软文 怎么做推广,网络营销的手段有哪些,做药材有什么好的网站,网站建设通1.先下载office2007 能另存为pdf的插件 SaveAsPDFandXPS.exe 安装 2.附件提供了jacob1.9的下载 3.这点很重要也是耗时我最久的就是jacob.dll与jacob.jar的存放位置;位置不对则会出现app.getProperty("Documents").toDispatch()这句话无法正常执行; 位置如下文件存放在…
1.先下载office2007 能另存为pdf的插件 SaveAsPDFandXPS.exe 安装

2.附件提供了jacob1.9的下载

3.这点很重要也是耗时我最久的就是jacob.dll与jacob.jar的存放位置;位置不对则会出现app.getProperty("Documents").toDispatch()这句话无法正常执行;

位置如下文件存放在jdk的 jre下 例如我这边是
jacob.jar 放在 E:\jdk1.5.0_14\jre\lib\ext
jacob.dll 放在 E:\jdk1.5.0_14\jre\bin
下能正常执行;
按网上说的 放在windows\system32下则会出现错误

源代码如下: 

package com;import java.io.File;import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.ComThread;
import com.jacob.com.Dispatch;
import com.jacob.com.Variant;public class Test
{static final int wdFormatPDF = 17;// PDF 格式public void wordToPDF(String sfileName, String toFileName){System.out.println("启动Word...");long start = System.currentTimeMillis();ActiveXComponent app = null;Dispatch doc = null;try{app = new ActiveXComponent("Word.Application");app.setProperty("Visible", new Variant(false));Dispatch docs = app.getProperty("Documents").toDispatch();doc = Dispatch.call(docs, "Open", sfileName).toDispatch();System.out.println("打开文档..." + sfileName);System.out.println("转换文档到PDF..." + toFileName);File tofile = new File(toFileName);if (tofile.exists()){tofile.delete();}Dispatch.call(doc, "SaveAs", toFileName, // FileNamewdFormatPDF);long end = System.currentTimeMillis();System.out.println("转换完成..用时:" + (end - start) + "ms.");}catch (Exception e){System.out.println("========Error:文档转换失败:" + e.getMessage());}finally{Dispatch.call(doc, "Close", false);System.out.println("关闭文档");if (app != null)app.invoke("Quit", new Variant[] {});}// 如果没有这句话,winword.exe进程将不会关闭ComThread.Release();}public static void main(String[] args){Test d = new Test();d.wordToPDF("E:\\合同文本2014.doc", "E:\\合同文本2014.pdf");}
}


package com;import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.Dispatch;
import com.jacob.com.Variant;public class TransformFiletoHtml
{public static void wordToPDF(String docfile, String toFile){ActiveXComponent app = new ActiveXComponent("Word.Application"); // 启动wordtry{app.setProperty("Visible", new Variant(false));Dispatch docs = app.getProperty("Documents").toDispatch();Dispatch doc = Dispatch.invoke(docs, "Open", Dispatch.Method,new Object[] { docfile, new Variant(false), new Variant(true) }, new int[1]).toDispatch();// new Variant(type),这里面的type的决定另存为什么类型的文件Dispatch.invoke(doc, "SaveAs", Dispatch.Method, new Object[] { toFile, new Variant(17) }, new int[1]);//Dispatch.invoke(doc, "SaveAs", Dispatch.Method, new Object[] { toFile }, new int[17]);Variant f = new Variant(false);Dispatch.call(doc, "Close", f);}catch (Exception e){e.printStackTrace();}finally{app.invoke("Quit", new Variant[] {});}}public static void main(String[] args){// 源文件全路径String docfile = "D:\\合同文本2014.doc";// 些路径test为实际存在的目录,s后面为要另存为的文件名String toFile = "D:\\合同文本2014.pdf";wordToPDF(docfile, toFile);}
}



http://www.hkea.cn/news/488480/

相关文章:

  • 学做网站需要多长时间免费推广平台排行
  • wordpress运行php 404360优化大师下载
  • seo排名网站 优帮云线上推广的三种方式
  • 平凉哪有做网站的百度推广登录入口官网网
  • 娄底网站优化自建网站平台有哪些
  • 做网站需要多少兆空间wix网站制作
  • 哪些网站教做生物实验今日新闻联播
  • 铜川市住房和城乡建设局网站信息流广告哪个平台好
  • 太原市建设交易中心网站首页百度手机助手app安卓版官方下载
  • 昆山网站建设网站建设郑州网络推广哪个好
  • 瑜伽网站设计国外推广网站
  • 什么网站做国外批发百度推广自己怎么做
  • 网站管理工具百度推广可以自己开户吗
  • 三水网站制作中山做网站推广公司
  • ysl网站设计论文郑州seo地址
  • 做食品的网站设计要注意片多多可以免费看电视剧吗
  • 网站排名推广自己怎么做长沙seo代理商
  • 手机网站改版公司加盟关键词优化排名查询
  • html5 图片网站建设企业网站多少钱
  • 企业网站定制开发流程网络营销的概念及特点
  • 做火影网站背景图农村电商平台有哪些
  • 国内html5网站建设seo兼职工资一般多少
  • 青海西宁网站建设公司百度网络推广
  • 服装公司网站设计百度站长收录入口
  • 做搜索关键词任务网站网站维护是什么意思
  • 2018什么做网站百度网盘网页版入口
  • 深圳福田大型商城网站建设石家庄最新疫情最新消息
  • 网站版面结构chatgpt 网站
  • 网站后期推广是谁来做广州百度推广开户
  • 不上此网站枉做男人免费制作网站平台