doc

Open source php doc/x to pdf conversion?

流过昼夜 提交于 2020-02-03 10:52:23
问题 Are there any open source PHP tools that i can use to convert .doc / .docx to pdf ? If you have any good tutorials or tools that would be greatly appreciated . I was looking into phpLiveDocx but looks like they charge monthly. Or maybe an .odt to pdf in php or linux ? 回答1: Try FPDF(dot)org. Dunno if it's open source but it seems easy to understand & use. EDIT: Didn't notice that it didn't do conversions. Maybe this blog post will help: Word to PDF conversion using OpenOffice on Windows.

利用NPOI生成word文档(c#)

僤鯓⒐⒋嵵緔 提交于 2020-01-31 07:20:44
WordTest.aspx.cs using System; using System.IO; using System.Text; using System.Web; using System.Web.UI; using NPOI.OpenXmlFormats.Wordprocessing; using NPOI.XWPF.UserModel; namespace WebDemo { public partial class WordTest : Page { protected void Page_Load(object sender, EventArgs e) { } /// <summary> /// 新增 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnPrint_Click(object sender, EventArgs e) { //创建document对象 var doc = new XWPFDocument(); //创建段落对象1 var p1 = doc.CreateParagraph(); p1.Alignment = ParagraphAlignment.CENTER; //字体居中 //创建run对象 /

pyquery学习笔记

谁说我不能喝 提交于 2020-01-28 01:13:46
pyquery介绍 pyquery库是jQuery的Python实现,能够以jQuery的语法来操作解析 HTML 文档,易用性和解析速度都很好,和它差不多的还有BeautifulSoup,都是用来解析的。 引入 from pyquery import PyQuery as pq 初始化为pyquery对象 对字符串进行初始化 doc = pq ( html ) 看一下doc的类型及内容: print ( type ( doc ) ) print ( doc ) 选择标签 常用CSS选择器 data = doc ( '.class1 .class2' ) 伪类选择器 查找标签 获取标签内容 提取属性值 data = doc ( '' ) . attr ( 'href' ) 提取文本 data = doc ( '' ) . text ( ) ; 来源: CSDN 作者: wxc0914 链接: https://blog.csdn.net/qq_37055438/article/details/104091989

es新增索引库

萝らか妹 提交于 2020-01-26 09:36:17
es新增索引库 postman 删除索引库 delete 47.94.215.96:9200/ds_resource_v1 新增索引库 put 47.94.215.96:9200/ds_resource_v1 新增字段 post 47.94.215.96:9200/ds_resource_v1/doc/_mapping { "doc": { "properties": { "author_id": { "type": "keyword" }, "comment_num": { "type": "long" }, "create_date": { "type": "date" }, "id": { "type": "long" }, "keywords": { "type": "text", "analyzer": "ik_max_word" }, "level": { "type": "long" }, "like_num": { "type": "long" }, "pic_list": { "type": "keyword" }, "promulgator": { "type": "text", "analyzer": "ik_max_word" }, "pub_time": { "type": "date" }, "read_num": { "type": "long" },

MongoDB 文档的更新操作

佐手、 提交于 2020-01-25 02:51:06
在MongoDB中,更新单个doc的操作是原子性的。默认情况下,如果一个update操作更新多个doc,那么对每个doc的更新是原子性的,但是对整个update 操作而言,不是原子性的,可能存在前面的doc更新成功,而后面的doc更新失败的情况。由于更新单个doc的操作是原子性的,如果两个更新同时发生,那么一个更新操作会阻塞另外一个,doc的最终结果值是由时间靠后的更新操作决定的。 通过使用 $isolated option,能够确保更新多个doc的写操作是原子性的,任何查询操作都会读取到更新操作,直到该操作完成(成功或失败)。 Prevents a write operation that affects multiple documents from yielding to other reads or writes once the first document is written. By using the $isolated option, you can ensure that no client sees the changes until the operation completes or errors out. MongoDB在新增和更新数据的时候,不会实时写入到Disk中,可能会丢失数据。 一,语法 默认情况下,update只会更新single doc

「扫盲」Elasticsearch

江枫思渺然 提交于 2020-01-21 10:07:52
前言 只有光头才能变强。 文本已收录至我的GitHub精选文章,欢迎Star : https://github.com/ZhongFuCheng3y/3y 不知道大家的公司用Elasticsearch多不多,反正我公司的是有在用的。平时听同事们聊天肯定避免不了不认识的技术栈,例如说:把数据放在引擎,从引擎取出数据等等。 如果对引擎不了解的同学,就压根听不懂他们在说什么(我就是听不懂的一位,扎心了)。引擎一般指的是搜索引擎,现在用得比较多的就是Elasticsearch。 这篇文章主要是对Elasticsearch一个简单的入门,没有高深的知识和使用。至少我想做到的是:以后同事们聊引擎了,至少知道他们在讲什么。 什么是Elasticsearch? Elasticsearch is a real-time, distributed storage, search, and analytics engine Elasticsearch 是一个 实时 的 分布式存储、搜索、分析 的引擎。 介绍那儿有几个关键字: 实时 分布式 搜索 分析 于是我们就得知道Elasticsearch是怎么做到实时的,Elasticsearch的架构是怎么样的(分布式)。存储、搜索和分析(得知道Elasticsearch是怎么存储、搜索和分析的) 这些问题在这篇文章中都会有提及。

C# Word转PDF/HTML/XML/XPS/SVG/EMF/EPUB/TIFF

雨燕双飞 提交于 2020-01-17 21:57:55
一款有着强大的文档转换功能的工具,无论何时何地都会是现×××公环境极为需要的。在本篇文章中,将介绍关于Word文档的转换功能(Word转XPS/SVG/EMF/EPUB/TIFF)。希望方法中的代码能为各位开发者们提供一定的参考价值。 使用工具 :Free Spire.Doc for .NET(社区版) 使用方法 : 下载 安装该控件后,在VS控制台应用程序中添加引用Spire.Doc.dll文件(dll文件可在该安装文件夹下Bin中获取) 1.Word转PDF/HTML/XML using Spire.Doc; namespace Doc2PDF { class Program { static void Main(string[] args) { //创建一个Document类对象,并加载Word文档 Document document = new Document(); document.LoadFromFile(@"C:\Users\Administrator\Desktop\Test.docx"); //调用方法SaveToFile()将Word转为PDF、HTML和XML document.SaveToFile("Test.PDF", FileFormat.PDF); document.SaveToFile("Test.html", FileFormat.Html);

原型模式

旧巷老猫 提交于 2020-01-17 00:26:50
个人博客 http://www.milovetingting.cn 原型模式 模式介绍 原型模式是一个创建型的模式。多用于创建复杂的或者构造耗时的实例,因为这种情况下,复制一个已经存在的实例,可使程序运行更高效。 模式定义 用原型实例指定创建对象的种类,并通过复制这些原型创建新的对象。 使用场景 类初始化需要消耗非常多的资源 通过new产生一个对象需要非常繁琐的数据准备或访问权限 一个对象需要提供给其它对象访问,而且各个调用者可能都需要修改值 通过实现Cloneable接口的原型模式在调用clone函数构造实例时,并不一定比通过new操作速度快,只有当通过new构造函数对象较为耗时或成本较高时,通过clone方法才能够获得效率上的提升。 简单实现 以简单的文档拷贝为例演示简单的原型模式。 先来演示浅拷贝 文档定义 public class Document implements Cloneable { private String mText; private ArrayList<String> mImages = new ArrayList<>(); public String getmText() { return mText; } public void setmText(String mText) { this.mText = mText; } public List

XmlDocument vs XElement

别等时光非礼了梦想. 提交于 2020-01-16 11:09:25
var xmlstr = @"<xml> <AppId>some_appid</AppId> <CreateTime>1413192605</CreateTime> <InfoType>component_verify_ticket</InfoType> <ComponentVerifyTicket>some_verify_ticket</ComponentVerifyTicket> </xml>"; Stopwatch sw = Stopwatch.StartNew(); for (int i = 0; i < 1000; i++) { XmlDocument doc = new XmlDocument(); doc.XmlResolver = null; XmlNode root; doc.LoadXml(xmlstr); root = doc.FirstChild; var sEncryptMsg = root["ComponentVerifyTicket"].InnerText; } sw.Stop(); var docts = sw.ElapsedMilliseconds; sw.Restart(); for (int i = 0; i < 1000; i++) { XElement xe = XElement.Parse(xmlstr); var sEncryptMsg

linux rpm命令之查询包安装与否、包详细信息、包安装位置、文件属于哪个包、包依赖

拟墨画扇 提交于 2020-01-16 03:02:57
查询这个包是否已安装 rpm -q 包名 rpm -qa -q 查询 -a all 查询已安装软件包和未安装软件包详细信息 rpm -qi 包名 rpm -qip 包全名 -i 查询软件信息 -p package,查询未安装包信息 查询软件包安装位置 rpm -ql 包名 -l 列表 -p 查询未安装包信息 rpm -ql pth /usr/lib64/libpth.so.20 /usr/lib64/libpth.so.20.0.27 /usr/share/doc/pth-2.0.7 /usr/share/doc/pth-2.0.7/ANNOUNCE /usr/share/doc/pth-2.0.7/AUTHORS /usr/share/doc/pth-2.0.7/COPYING /usr/share/doc/pth-2.0.7/ChangeLog /usr/share/doc/pth-2.0.7/HISTORY /usr/share/doc/pth-2.0.7/NEWS /usr/share/doc/pth-2.0.7/PORTING /usr/share/doc/pth-2.0.7/README /usr/share/doc/pth-2.0.7/SUPPORT /usr/share/doc/pth-2.0.7/TESTS /usr/share/doc/pth-2.0.7