doc

Parse Microsoft Office files in Node.JS

两盒软妹~` 提交于 2019-12-02 22:39:35
I'm working on a web application where users can upload Microsoft Office Document files. Right now, our server is running Node.JS with Express.js and we're hosted on Heroku. Because of this, I don't think that I can install programs such as abiword or catdoc. I can handle the file uploads, but can't parse the contents of the document. How can I read the contents of the doc file? The information will then be put into a database. It'd be nice to preserve basic formatting (bold, italic, underline), but not essential. While there don't seem to be anything you can get with NPM that will do Word

使用python调用wps v9转换office文件到pdf

匿名 (未验证) 提交于 2019-12-02 22:11:45
#!/usr/bin/python2.6 # -*- coding: utf-8 -*- # pip install timeout-decorator import os import win32com.client # wps使用的是wps2016版本 # 转换 Word文件档到pdf def ConvertDocToPdf(src, dst): if not os.path.exists(src): print(src + "不存在,无法继续!") return False os.system('taskkill /im wps.exe') # 如果文件存在就删除 if os.path.exists(dst): os.remove(dst) o = win32com.client.Dispatch("Kwps.Application") o.Visible = False doc = o.Documents.Open(src); doc.ExportAsFixedFormat(dst, 17) o.Quit(); if os.path.exists(dst): return True else: return False # 转换 Ppt文件档到pdf def ConvertPptToPdf(src, dst): if not os.path.exists(src):

【Revit API】创建工作集并将element加入工作集中

匿名 (未验证) 提交于 2019-12-02 22:10:10
话不多说,直接上代码! public class WorkSetHelper { public void AddElementsToWorkSet(Document doc, List<Element> elements) { if (doc.IsWorkshared == true) { var workset = GetWorkset(doc); if (workset != null) { var worksetID = workset.Id.IntegerValue; using (Transaction tran = new Transaction(doc, "[ToolSet] Add Elemens To WorkSet")) { tran.Start(); foreach (var ele in elements) { Parameter wsparam = ele.get_Parameter(BuiltInParameter.ELEM_PARTITION_PARAM); if (wsparam != null) { wsparam.Set(worksetID); } } tran.Commit(); } } } } public Workset GetWorkset(Document doc) { Workset newWorkset = null; //

.net MVC使用Aspose.Words 获取文本域获取文档

匿名 (未验证) 提交于 2019-12-02 22:06:11
controller 1 using Aspose.Words; 2 using Aspose.Words.Saving; 3 using System.IO; 4 5 6 /// <summary> 7 /// 获取导入Word 文档 8 /// </summary> 9 /// <param name="PaperId"></param> 10 /// <returns></returns> 11 public ActionResult GetWord(int PaperId) 12 { 13 try 14 { 15 var __data = _paperApp.GetWord(PaperId); 16 string tempPath = Server.MapPath("~/Template/导出模版.docx"); 17 string outputPath = Server.MapPath("~/Resources/Output/模版_temp.doc"); 18 //载入模板 19 var doc = new Document(tempPath); 20 //提供数据源 21 String[] fieldNames = new String[] { "PaperName", "PaperTypeName", "SingleChoiceCount",

Elasticsearch 快速开始

匿名 (未验证) 提交于 2019-12-02 20:37:20
Elasticsearch 是一个分布式的 RESTful 风格的搜索和数据分析引擎。 查询 : Elasticsearch 允许执行和合并多种类型的搜索 ― 结构化、非结构化、地理位置、度量指标 ― 搜索方式随心而变。 分析 : 找到与查询最匹配的十个文档是一回事。但是如果面对的是十亿行日志,又该如何解读呢?Elasticsearch 聚合让您能够从大处着眼,探索数据的趋势和模式。 速度 : Elasticsearch 很快。真的,真的很快。 HADOOP & SPARK : Elasticsearch + Hadoop 准备开始 Elasticsearch是一个高度可伸缩的开源全文搜索和分析引擎。它允许您快速和接近实时地存储、搜索和分析大量数据。 这里有一些使用Elasticsearch的用例: 你经营一个网上商店,你允许你的顾客搜索你卖的产品。在这种情况下,您可以使用Elasticsearch来存储整个产品目录和库存,并为它们提供搜索和自动完成建议。 你希望收集日志或事务数据,并希望分析和挖掘这些数据,以查找趋势、统计、汇总或异常。在这种情况下,你可以使用loghide (Elasticsearch/ loghide /Kibana堆栈的一部分)来收集、聚合和解析数据,然后让loghide将这些数据输入到Elasticsearch中。一旦数据在Elasticsearch中

Use PHP to create a DOC file on a Unix Box based on an HTML webform selection

可紊 提交于 2019-12-02 17:59:31
问题 I have an HTML file which contains a webform with multiple questions which have a YES / NO responses. If the question has a YES answer, I would like a predefined ( per question ) section of text to be written to a DOC file on the server, but only AFTER the submit button has been pressed ( this way, if the user changes their mind and changes an answer form YES to NO, I won't have to re-write the doc ). When the user has clicked Submit, The file should be presented as a download. Any Ideas 回答1:

还在为打印PDF文件发愁?文档开发工具Spire.PDF 6种方式帮你搞定!

筅森魡賤 提交于 2019-12-02 15:48:34
Spire.PDF (点击下载) 是一个专业的PDF组件,能够独立地创建、编写、编辑、操作和阅读PDF文件,支持 .NET、Java、WPF和Silverlight。 Spire.PDF 的PDF API拥有丰富的功能,如安全设置(包括数字签名)、PDF文本/附件/图片提取、PDF文件合并/拆分、元数据更新、章节和段落优化、图形/图像描绘和插入、表格创建和处理、数据导入等等。 本文将介绍以下几种常见方式: 使用默认打印机打印PDF文档 使用虚拟打印机(Microsoft XPS Document Writer)打印PDF文档 指定打印机及PDF文档打印页码范围 静默打印PDF文档 双面打印PDF文档 使用默认打印机 //加载PDF文档 PdfDocument doc = new PdfDocument(); doc.LoadFromFile("Test.pdf"); //使用默认打印机打印文档所有页面 doc.PrintDocument.Print(); 使用虚拟打印机(Microsoft XPS Document Writer) //加载PDF文档 PdfDocument doc = new PdfDocument(); doc.LoadFromFile("Test.pdf"); //选择Microsoft XPS Document Writer打印机 doc

How can doc/docx files be converted to markdown or structured text?

一个人想着一个人 提交于 2019-12-02 14:21:44
Is there a program or workflow to convert .doc or .docx files to Markdown or similar text? PS: Ideally, I would welcome the option that a specific font (e.g. consolas ) in the MS Word document will be rendered to text-code: ```....``` . massives Pandoc supports conversion from docx to markdown directly: pandoc -f docx -t markdown foo.docx -o foo.markdown Several markdown formats are supported: -t gfm (GitHub-Flavored Markdown) -t markdown_mmd (MultiMarkdown) -t markdown (pandoc’s extended Markdown) -t markdown_strict (original unextended Markdown) -t markdown_phpextra (PHP Markdown Extra) -t

Find out page numbers of PDF, Docx, Doc, Ppt, Pptx files with PHP [closed]

早过忘川 提交于 2019-12-02 13:21:57
I want this functionality in my PHP application: When user upload a document (PDF, DOCX, DOC, PPT, PPTC extensions) then after uploading user get the total number of pages of document. But without using exec() function. Whiteflash It is possible to do some formats right in PHP. The DOCx and PPTx are easy: For Word files: function PageCount_DOCX($file) { $pageCount = 0; $zip = new ZipArchive(); if($zip->open($file) === true) { if(($index = $zip->locateName('docProps/app.xml')) !== false) { $data = $zip->getFromIndex($index); $zip->close(); $xml = new SimpleXMLElement($data); $pageCount = $xml-

软件开发国标文档(GB8567——88)

為{幸葍}努か 提交于 2019-12-02 10:36:28
包括: 1-操作手册(GB8567-88).doc 2-测试分析报告(GB8567-88).doc 3-测试计划(GB856788).doc 4-概要设计说明书(GB856788).doc 5-开发进度月报(GB8567-88).doc 6-可行性研究报告(GB856788).doc 7-模块开发卷宗(GB856788).doc 8-软件需求说明书(GB856T88).doc 9-数据库设计说明书(GB856788).doc 10-数据要求说明书(GB856T-88).doc 11-文件给制实施规定的实例(GB8567-88).doc 12-详细设计说明书(GB856788).doc 13-项目开发计划(GB856T88).doc 14-项目开发总结报告(GB856788).doc 15-用户手册(GB856788).doc 来源: https://blog.csdn.net/IT_xiao_guang_guang/article/details/102748335