您好,
我透過 aspose.pdf 讀取 html 檔後,將它另存成 word 檔後,
在 word 中的單頁檢視時,很多的內容會被截掉。
測試程式如下,
var htmlLoadOptions = new Aspose.Pdf.HtmlLoadOptions();
htmlLoadOptions.InputEncoding = "UTF-8";
htmlLoadOptions.PageInfo.Margin.Left = 5;
htmlLoadOptions.PageInfo.Margin.Right = 5;
htmlLoadOptions.PageInfo.Margin.Top = 0;
htmlLoadOptions.PageInfo.Margin.Bottom = 0;
htmlLoadOptions.PageInfo.IsLandscape = true;
var pdf = new Aspose.Pdf.Document("test.html", htmlLoadOptions);
var docsaveOptions = new Aspose.Pdf.DocSaveOptions();
docsaveOptions.Format = DocSaveOptions.DocFormat.Doc;
pdf.Save("wtest.doc", docsaveOptions);
測試的html檔如附件,
htmlTest.zip (3.6 KB)
word 的檢視如下,
asposepdf2doc.png (172.7 KB)
感謝您的幫忙。