Skip to content

word文档转为pdf格式问题 #64

@HmgsLJ

Description

@HmgsLJ

Hi,很难得有开源的pdf组件,非常感谢你的无私~

目前我使用MiniPdf遇到携带表格的docx文件,转为pdf时出现两个问题,使用aspose组件转化同一份文件是正常的;
1、表格中,横线部分缺失,竖线排版错乱;
2、无端多了一页空白页。

目前还没去调试源码看问题出在哪,先反馈下~

using Aspose.Words;
using MiniSoftware;
using System.Text;
Console.WriteLine("Hello, World!");
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

string directory = Path.Combine("Files", "Output");
if (!Directory.Exists(directory))
{
    Directory.CreateDirectory(directory);
}
var wordPath = Path.Combine("Files", "Test01.docx");
MiniPdf.ConvertToPdf(wordPath, Path.Combine("Files", "Output", "output01.pdf"));


var doc = new Document(wordPath); 
doc.Save(Path.Combine("Files", "Output", "Aspose-Output01.pdf"));

这是转化前的word文档截图
Image

这是转化后的pdf文件截图
Image

转化的word文档
Test01.docx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions