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

怎么在网站里做关键词优化seo关键词布局技巧

怎么在网站里做关键词优化,seo关键词布局技巧,怎么做百度网站验证码,市场调研报告范文pdf 转 word 一、思路 直接调用LibreOffice 命令进行文档转换的命令行工具 使用的前系统中必须已经安装了 libreofficelibreoffice已翻译的用户界面语言包: 中文 (简体)libreoffice离线帮助文档: 中文 (简体)上传字体 重点:重点:重点: 亲…

pdf 转 word

一、思路

  1. 直接调用LibreOffice 命令进行文档转换的命令行工具
    使用的前系统中必须已经安装了
  • libreoffice
  • libreoffice已翻译的用户界面语言包: 中文 (简体)
  • libreoffice离线帮助文档: 中文 (简体)
  • 上传字体

重点:
重点:
重点:

亲测 7.1.8版本pdf 转word后正常 ,
7.4.6版本转出来的样式有问题,都挤在一页,重叠在一起。

二、软件安装下载

1. windows安装

下载 LibreOffice | LibreOffice 简体中文官方网站 - 自由免费的办公套件
a.安装
直接一键默认安装
环境变量:在path前加入libreoffice安装路径(如:D:\Program Files\LibreOffice\program)

进入dos窗口输入soffice 如果弹出libreoffice界面则表示安装成功

b. 中文包
另外再下载安装下以中文包,此处略过

  • libreoffice已翻译的用户界面语言包: 中文 (简体)
  • libreoffice离线帮助文档: 中文 (简体)

soffice --infilter="writer_pdf_import" --convert-to doc 11种绕过CDN查找真实IP 方法.pdf 2>&1

2 certos7版本安装

    1. CentOS系统环境:
[root@localhost ~]# cat   /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
    1. 7.1.8包下载地址
      Index of /libreoffice/old/7.1.8.1/rpm/x86_64
## 下载下面三个包
wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.1.8.1/rpm/x86_64/LibreOffice_7.1.8.1_Linux_x86-64_rpm.tar.gz
wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.1.8.1/rpm/x86_64/LibreOffice_7.1.8.1_Linux_x86-64_rpm_helppack_zh-CN.tar.gz
wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.1.8.1/rpm/x86_64/LibreOffice_7.1.8.1_Linux_x86-64_rpm_langpack_zh-CN.tar.gz
    1. 解压并安装
## 主包
tar -xvf LibreOffice_7.1.8.1_Linux_x86-64_rpm.tar.gz
yum install ./LibreOffice_7.1.8.1_Linux_x86-64_rpm/RPMS/*.rpm -y## 已翻译的用户界面语言包: 中文 (简体)
tar -xvf LibreOffice_7.1.8.1_Linux_x86-64_rpm_langpack_zh-CN.tar.gz
yum install ./LibreOffice_7.1.8.1_Linux_x86-64_rpm_langpack_zh-CN/RPMS/*.rpm -y## 离线帮助文档: 中文 (简体)
tar -xvf LibreOffice_7.1.8.1_Linux_x86-64_rpm_helppack_zh-CN.tar.gz
yum install ./LibreOffice_7.1.8.1_Linux_x86-64_rpm_helppack_zh-CN/RPMS/*.rpm -y

3. Debian 版本安装

root@4f14d865967a:/# cat /etc/issue
Debian GNU/Linux 11 \n \l
    1. Debian 系统从下面地址下载安装包
      Index of /libreoffice/old/7.1.8.1/deb/x86_64
    1. 7.1.8包下载地址
wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.1.8.1/deb/x86_64/LibreOffice_7.1.8.1_Linux_x86-64_deb.tar.gz
wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.1.8.1/deb/x86_64/LibreOffice_7.1.8.1_Linux_x86-64_deb_helppack_zh-CN.tar.gz
wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.1.8.1/deb/x86_64/LibreOffice_7.1.8.1_Linux_x86-64_deb_langpack_zh-CN.tar.gz
    1. 解压并安装
## 主包
tar -xvf LibreOffice_7.1.8.1_Linux_x86-64_deb.tar.gz
dpkg -i LibreOffice_7.1.8.1_Linux_x86-64_deb/DEBS/*.deb## 离线帮助文档: 中文 (简体)
tar -xvf LibreOffice_7.1.8.1_Linux_x86-64_deb_helppack_zh-CN.tar.gz
dpkg -i  LibreOffice_7.1.8.1_Linux_x86-64_deb_helppack_zh-CN/DEBS/*.deb## 已翻译的用户界面语言包: 中文 (简体)
tar -xvf LibreOffice_7.1.8.1_Linux_x86-64_deb_langpack_zh-CN.tar.gz
dpkg -i LibreOffice_7.1.8.1_Linux_x86-64_deb_langpack_zh-CN/DEBS/*.deb
    1. 使用帮助
      测试是否安装成功:
    libreoffice7.1 -help (根据使用的版本自己调整命令版本号)
    
    1. 查看版本
[root@localhost testPdf2word]# libreoffice7.1 -version
Warning: -version is deprecated.  Use --version instead.
LibreOffice 7.1.8.1 e1f30c802c3269a1d052614453f260e49458c82c

4. 安装字体

安装字体是为了防止中文乱码问题处理

1:查看fonts目录:cat /etc/fonts/fonts.conf | grep fon
得知字体存放位置:/usr/share/fonts

[root@localhost Fonts]# cat /etc/fonts/fonts.conf | grep fon
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>problems to the fontconfig bugzilla system located at fontconfig.orgNote that the normal 'make install' procedure for fontconfig is toreplace any existing fonts.conf file with the new version.  Place<dir>/usr/share/fonts</dir><dir>/usr/share/X11/fonts/Type1</dir> <dir>/usr/share/X11/fonts/TTF</dir> <dir>/usr/local/share/fonts</dir><dir prefix="xdg">fonts</dir><dir>~/.fonts</dir><cachedir>/usr/lib/fontconfig/cache</cachedir><cachedir prefix="xdg">fontconfig</cachedir><cachedir>~/.fontconfig</cachedir>
</fontconfig>

2: 新建/usr/share/fonts/Fonts文件夹
mkdir /usr/share/fonts/Fonts

3:把Windows下的字体C:\Windows\Fonts下的宋体,即 simsun.ttc上传到linux服务器 /usr/share/fonts/Fonts/ 路径下即可

[root@localhost Fonts]# ll
总用量 17788
-rw-r--r--. 1 root root 18214472 4月  21 09:39 SIMSUN.TTC

4: 查看刚指定的字体

[root@localhost Fonts]# fc-list :lang=zh
/usr/share/fonts/Fonts/SIMSUN.TTC: 新宋体,NSimSun:style=常规,Regular
/usr/share/fonts/Fonts/SIMSUN.TTC: 宋体,SimSun:style=常规,Regular

5:至此安装成功

三、实现PDF转word文档

pdf 转 word 2003

参数说明
## --outdir为 输出目标
## --convert-to 转换格式

libreoffice7.1 --infilter="writer_pdf_import" --convert-to doc ip.pdf --outdir ./ 2>&1

pdf 转 word 2007

libreoffice7.1 --infilter="writer_pdf_import" --convert-to docx ip.pdf --outdir ./ 2>&1

四、制作自己的镜像

  1. 运行容器 基于cypress/browsers
    docker run --name=browsers -itd cypress/browsers

  2. 进入容器安装 LibreOffice_7.1.8.1软件
    进入browsers容器 使用上面的Debian 版本安装方式安装好

  3. 打包镜像
    docker commit 4f14d865967a 10.10.11.145:8082/cypress/browsers_libreoffice7.1:latest

  4. 查看打好镜像

[root@cert-admin-api-service ~]# docker images | grep browsers_libreoffice7.1
10.10.11.145:8082/cypress/browsers_libreoffice7.1                  latest                                                   5d2e6f5dc95b   3 minutes ago   3.34GB
  1. 登录镜像仓库
    sudo docker login 127.0.0.1:8082 -u 用户名 -p 密码

6.推送到镜像仓库

docker push 127.0.0.1:8082/cypress/browsers_libreoffice7.1:latest

五、遇到的坑

1. 版本问题

亲测 7.1.8版本pdf 转word后正常 ,
7.4.6版本转出来的样式有问题,都挤在一页,重叠在一起。

image

解决方法:
安装7.1.8版本
安装7.1.8版本
安装7.1.8版本

2. 字体重叠问题

image

解决方法

为因是 html 转的 pdf ,然后再用 pdf 转为 word
出现字体重叠问题,是因为使用粗体导致,所以 html css 样式不要使用
font-weight: bold;

六、go代码实现

使用 golang 执行 cmd 命令,调用 libreoffice7,实现 pdf 转 word 

/*参数说明## --outdir 为 输出目文件夹路径## --convert-to 转换格式 例 doc  / docx  /pdfsourcePdfPath pdf源文件路径 例 staitc/download/ip.pdfcreateWordPath 生成的word文件夹路径 例 static/download/usr/local/bin/libreoffice7.1 --infilter="writer_pdf_import" --convert-to doc staitc/download/ip.pdf --outdir staitc/download 2>&1
*/
//Pdf2Word pdf 转 wordfunc Pdf2Word(sourcePdfPath, createWordDirPath string) (filePath string, err error) {argStr := fmt.Sprintf(`libreoffice7.1 --infilter="writer_pdf_import" --convert-to doc %s --outdir %s`, sourcePdfPath, createWordDirPath)cmd := exec.Command("/bin/sh", "-c", argStr)log.Println("cmd:-->", cmd.String())// 方法一//stderr, err := cmd.StderrPipe()//if err != nil {//	log.Println("stderr1:-->", err.Error())//	return//}//stdout, err := cmd.StdoutPipe()//if err != nil {//	log.Println("stderr2:-->", err.Error())//	return//}//if err = cmd.Start(); err != nil {//	log.Println("stderr3:-->", err.Error())//	return//}//outErr, err := io.ReadAll(stderr)//if err != nil {//	log.Println("stderr4:-->", err.Error())//	return//}//out, err := io.ReadAll(stdout)//if err != nil {//	log.Println("stderr5:-->", err.Error())//	return//}//if err = cmd.Wait(); err != nil {//	log.Println("stderr6:-->", err.Error())//	return//}//log.Printf("Result: %s, outErr: %s; /n", out, outErr)// 方法二var out bytes.Buffervar stderr bytes.Buffercmd.Stdout = &outcmd.Stderr = &stderrerr = cmd.Run()//log.Println("cmd.Run() failed:", fmt.Sprint(err)+": "+stderr.String())if err != nil {log.Println("cmd.Run() failed22:", fmt.Sprint(err)+": "+stderr.String())return}log.Println("pdf2Word success . Result: " + out.String())//获取文件名带后缀filenameWithSuffix := path.Base(sourcePdfPath)//获取文件后缀fileSuffix := path.Ext(filenameWithSuffix)//获取文件名filenameOnly := strings.TrimSuffix(filenameWithSuffix, fileSuffix)filePath = createWordDirPath + "/" + filenameOnly + ".doc"return filePath, nil
}

文章转载自:
http://dinncohow.bkqw.cn
http://dinncoverbenaceous.bkqw.cn
http://dinncoskiwear.bkqw.cn
http://dinncometaraminol.bkqw.cn
http://dinncofringlish.bkqw.cn
http://dinncoresupine.bkqw.cn
http://dinncoamorphous.bkqw.cn
http://dinncosalutiferous.bkqw.cn
http://dinncojnd.bkqw.cn
http://dinncowalkathon.bkqw.cn
http://dinncodevilled.bkqw.cn
http://dinncobmta.bkqw.cn
http://dinncolietuva.bkqw.cn
http://dinncoinaffable.bkqw.cn
http://dinncobcom.bkqw.cn
http://dinncobumpy.bkqw.cn
http://dinncodiscontinuously.bkqw.cn
http://dinncorollock.bkqw.cn
http://dinncodiscography.bkqw.cn
http://dinncoflittermouse.bkqw.cn
http://dinncocriticaster.bkqw.cn
http://dinncocycloolefin.bkqw.cn
http://dinncounderplot.bkqw.cn
http://dinncoappraisal.bkqw.cn
http://dinncofreshness.bkqw.cn
http://dinncobrumal.bkqw.cn
http://dinncomidgard.bkqw.cn
http://dinnconucleochronology.bkqw.cn
http://dinncodotty.bkqw.cn
http://dinncotelescopiform.bkqw.cn
http://dinncoheterotrophy.bkqw.cn
http://dinncochancery.bkqw.cn
http://dinncobasilicon.bkqw.cn
http://dinncobose.bkqw.cn
http://dinncomithras.bkqw.cn
http://dinncoanalgesia.bkqw.cn
http://dinncohow.bkqw.cn
http://dinncomajorette.bkqw.cn
http://dinncopedagoguism.bkqw.cn
http://dinncoembryonal.bkqw.cn
http://dinncoblintz.bkqw.cn
http://dinncocarhop.bkqw.cn
http://dinncoalso.bkqw.cn
http://dinncodeicide.bkqw.cn
http://dinncogunnera.bkqw.cn
http://dinncoevasively.bkqw.cn
http://dinncospitter.bkqw.cn
http://dinncofireworm.bkqw.cn
http://dinncopalooka.bkqw.cn
http://dinncocompliment.bkqw.cn
http://dinncoacculturationist.bkqw.cn
http://dinncoautocollimation.bkqw.cn
http://dinncocraftsmanlike.bkqw.cn
http://dinncofarci.bkqw.cn
http://dinncoepigraph.bkqw.cn
http://dinncotranshydrogenase.bkqw.cn
http://dinncoinvariablenes.bkqw.cn
http://dinncomisogyny.bkqw.cn
http://dinncouniat.bkqw.cn
http://dinncocomfortless.bkqw.cn
http://dinncoreformist.bkqw.cn
http://dinncopetcock.bkqw.cn
http://dinncotowardly.bkqw.cn
http://dinncoultramontanism.bkqw.cn
http://dinncotransmutation.bkqw.cn
http://dinncosloughy.bkqw.cn
http://dinncophotoemission.bkqw.cn
http://dinncoharmine.bkqw.cn
http://dinncoremelt.bkqw.cn
http://dinncopatinous.bkqw.cn
http://dinncoauditor.bkqw.cn
http://dinncocapably.bkqw.cn
http://dinncoesophagus.bkqw.cn
http://dinncoantichrist.bkqw.cn
http://dinncobotel.bkqw.cn
http://dinncocostotomy.bkqw.cn
http://dinncospindly.bkqw.cn
http://dinncodepeople.bkqw.cn
http://dinncofugue.bkqw.cn
http://dinncodetoxicant.bkqw.cn
http://dinncoido.bkqw.cn
http://dinncohonolulan.bkqw.cn
http://dinncofluoropolymer.bkqw.cn
http://dinncoridgy.bkqw.cn
http://dinncobenzoyl.bkqw.cn
http://dinncosulfonal.bkqw.cn
http://dinncoperdurable.bkqw.cn
http://dinncoowllight.bkqw.cn
http://dinncometempirics.bkqw.cn
http://dinncoastonied.bkqw.cn
http://dinncokirtle.bkqw.cn
http://dinncopapreg.bkqw.cn
http://dinncocraniotomy.bkqw.cn
http://dinncosibiric.bkqw.cn
http://dinncobastard.bkqw.cn
http://dinncoreplaceable.bkqw.cn
http://dinncoritard.bkqw.cn
http://dinncodiapophysis.bkqw.cn
http://dinncokumasi.bkqw.cn
http://dinncothunderstone.bkqw.cn
http://www.dinnco.com/news/125301.html

相关文章:

  • 电脑买编程代码做网站灰色词快速排名方法
  • 设计案例网站新闻今天
  • 团购网站优化网站seo推广排名
  • 个人网站icp备案教程百度网页版下载
  • 网站建设的未来aso平台
  • 东城企业网站开发网站日常维护有哪些
  • 网站制作工资网站开发工具
  • 做炭化料的网站国内免费推广产品的网站
  • 重庆网站备案最快几天关键词搜索排名优化
  • 网站怎么做跟踪链接免费注册个人网站
  • wwwroot wordpress厦门seo专业培训学校
  • 建立免费空间网站百度广告收费表
  • 政府网站建设的国际象山关键词seo排名
  • 阿里巴巴网站本土化建设小红书关键词排名
  • 网站设计服务费一般多少钱拉新推广渠道
  • 网站建设市区哈尔滨百度网络推广
  • wordpress分享微信插件下载深圳seo博客
  • wordpress国产插件桔子seo查询
  • 建立企业网站几天成都网站建设方案托管
  • 中牟网站制作内容营销策略有哪些
  • 佛山专业的做网站山东今日头条新闻
  • 常州网站建设公司机构seo人人网
  • 做电影网站如何不侵权营销型企业网站的功能
  • 南昌集团网站建设网页在线代理翻墙
  • 在线旅游网站怎么优化网站关键词的方法
  • 做网站青岛seo是什么的
  • 网站优化有前途吗制作网站的步骤和过程
  • 西安做网站 好运网络太原最新情况
  • 公司的网站如何建设方案乐陵seo外包
  • 盘锦网站变建设渠道推广策略