【问题标题】:Conversion of word to pdf with original document dimensions using spire doc使用 spire doc 将 word 转换为具有原始文档尺寸的 pdf
【发布时间】:2016-08-23 03:07:04
【问题描述】:

如何将word文件转换为PDF,以便源文档的页边距和方向等页面设置与输出PDF相同。我尝试了E-ICEBLUE的以下代码。

'Load Document
Dim document As New Document()
document.LoadFromFile("E:\work\documents\TestSample.docx")

'Convert Word to PDF
document.SaveToFile("toPDF.PDF", FileFormat.PDF)

'Launch Document
System.Diagnostics.Process.Start("toPDF.PDF")

但是转换后的PDF没有完整的文档。它的页眉和页脚没有显示,并且文档的右侧正在切割。如何解决这个问题? This is my converted pdf

【问题讨论】:

  • 你看过 COM 互操作吗?

标签: asp.net vb.net pdf spire.doc


【解决方案1】:

这里有代码演示。

尝试您的 doc 文件并生成 pdf。看代码

http://www.e-iceblue.com/LiveDemo/Spire.Doc/Conversion.html

带有页眉和页脚

http://www.e-iceblue.com/LiveDemo/Spire.Doc/Header-and-Footer.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-10
    • 2021-11-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多