标签: doc

以编程方式将docx文件转换为doc

我有什么选择使用C#以编程方式将.docx文档转换为.doc文档?我希望尽可能便宜地做到这一点.理想情况下,我希望通过.net框架内的库或通过良好建立的可下载dll直接在代码中执行此操作.

我们的一个约束是我们无法将Office安装到我们的服务器上.

c# doc docx

5
推荐指数
1
解决办法
3658
查看次数

使用Java将Microsoft Word文档读入纯文本(DOC,DOCX)

我正在寻找Java中的东西来阅读Word文档来处理他们的文本..所有我需要的是文本,没什么花哨的.我知道Apache POI,但它现在不包括对DOCX的支持,那里有什么东西?

java ms-word doc docx

5
推荐指数
1
解决办法
9002
查看次数

将一个复选框标记为以单词(.docx)格式选中

我正在使用ruby / nokogiri解析单词形式并填写字段。我已经设法填写了文本字段,但是在检查复选框时遇到了困难。我查看了document.xml,并且未选中该复选框时没有注意到任何其他标签

xml ms-word doc docx

5
推荐指数
1
解决办法
3616
查看次数

如何使用POI读取粗体和斜体格式的Word文档

我正在使用Apache POI。

我可以使用“ org.apache.poi.hwpf.extractor.WordExtractor”从文档文件中读取文本

甚至通过使用“ org.apache.poi.hwpf.usermodel.Table”获取表

但请提出建议,我该如何获取文本的粗体/斜体格式。

提前致谢。

doc bold hwpf apache-poi italic

5
推荐指数
1
解决办法
3279
查看次数

使用Apache POI将doc转换为pdf

我正在尝试使用Apache POI将doc转换为pdf,但生成的pdf文档只包含文本,它没有像图像,表格对齐等任何格式.

如何将doc转换为pdf,并具有表格,图像,对齐等所有格式?

这是我的代码:

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.OutputStream;

import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.PdfWriter;


import org.apache.poi.hwpf.HWPFDocument;
import org.apache.poi.hwpf.extractor.WordExtractor;

import org.apache.poi.hwpf.usermodel.Range;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;


public class demo {
    public static void main(String[] args) {

        POIFSFileSystem fs = null;  
        Document document = new Document();

         try {  
             System.out.println("Starting the test");  
             fs = new POIFSFileSystem(new FileInputStream("Resume.doc"));  

             HWPFDocument doc = new HWPFDocument(fs);  
             WordExtractor we = new WordExtractor(doc);  

             OutputStream file = new FileOutputStream(new File("test.pdf")); 

             PdfWriter writer = PdfWriter.getInstance(document, file);  

             Range range …
Run Code Online (Sandbox Code Playgroud)

java pdf pdf-generation doc apache-poi

5
推荐指数
1
解决办法
3万
查看次数

哪个是将docx转换为pdf的最佳Java API

我需要一个API java用于将docx转换为pdf,我用XDocReport测试但我相信这不会转换文档头部的图像.我需要在pdf中转换表格,图像和边框,api可以支付或者免费.提前致谢.

java ms-word doc itext apache-poi

5
推荐指数
1
解决办法
8757
查看次数

Apache POI - 使用图像将 *.doc 转换为 *.html

有一个包含一些图像的 DOC 文件。如何将其转换为带有图像的 HTML?

我尝试使用这个例子: Convert Word doc to HTML programmatically in Java

public class Converter {
    ...

    private File docFile, htmlFile;

    try {
        FileInputStream fos = new FileInputStream(docFile.getAbsolutePath()); 
        HWPFDocument doc = new HWPFDocument(fos);       
        Document newDoc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();

        WordToHtmlConverter wordToHtmlConverter = new WordToHtmlConverter(newDoc) ;
        wordToHtmlConverter.processDocument(doc);

        StringWriter stringWriter = new StringWriter();

        Transformer transformer = TransformerFactory.newInstance().newTransformer();        
        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
        transformer.setOutputProperty(OutputKeys.ENCODING, "utf-8");
        transformer.setOutputProperty(OutputKeys.METHOD, "html");
        transformer.transform(
                    new DOMSource(wordToHtmlConverter.getDocument()),
                    new StreamResult(stringWriter)
        );

        String html = stringWriter.toString();

        try {
            BufferedWriter out = new BufferedWriter(
                new OutputStreamWriter(new FileOutputStream(htmlFile), …
Run Code Online (Sandbox Code Playgroud)

java doc apache-poi

4
推荐指数
1
解决办法
1万
查看次数

如何使用Python从doc/docx文件中提取数据

我知道那里有类似的问题,但我找不到能回答我祈祷的事情.我需要的是一种从MS-Word文件访问某些数据并将其保存在XML文件中的方法.阅读python-docx并没有帮助,因为它似乎只允许一个人写入word文档,而不是阅读.准确地呈现我的任务(或者我如何选择接近我的任务):我想在文档中搜索关键词或短语(文档包含表格)并从表格中提取关键词/短语的文本数据找到.有人有什么想法吗?

python ms-word doc docx

4
推荐指数
3
解决办法
2万
查看次数

解析 .doc 和 .docx 以使用 golang 获取所有文本?

如何使用golang解析word文档“.doc”、“.docx”以获取所有文本?

ms-word doc docx go

4
推荐指数
1
解决办法
7030
查看次数

go-swagger - 未生成/找到/导入类型结构

我正在尝试使用 go-swagger 生成 Go 服务的规范/文档

swagger generate spec -o ./docs/swagger.json --scan-models
Run Code Online (Sandbox Code Playgroud)

我能够生成基本信息+路线,但我的结构遇到了问题\

这里:用户结构未导入

docs/docs.go - github

// Package classification Users' Data API
//
// Documentation for Users' Data API
//
//  Schemes: http
//  BasePath: /v1
//  Version: 0.1.0
//
//  Consumes:
//  - application/json
//
//  Produces:
//  - application/json
//
// swagger:meta
package classification

import (
    M "service-users-data/internals/database/models"
)

// A list of all Users
// swagger:response usersResponse
type productsResponseWrapper struct {
    // All current Users
    // …
Run Code Online (Sandbox Code Playgroud)

api documentation doc go swagger

4
推荐指数
1
解决办法
1425
查看次数

标签 统计

doc ×10

docx ×5

ms-word ×5

apache-poi ×4

java ×4

go ×2

api ×1

bold ×1

c# ×1

documentation ×1

hwpf ×1

italic ×1

itext ×1

pdf ×1

pdf-generation ×1

python ×1

swagger ×1

xml ×1