Word转PDF
转换后的PDF文件与WORD源文件有文字错位及文字丢失的问题,
使用组件版本
Aspose.Words for .NET 20.5.0
Aspose.PDF for .NET 20.5.0
转换代码
Aspose.Words.Saving.PdfSaveOptions options = new Aspose.Words.Saving.PdfSaveOptions
{
JpegQuality = 100,
Compliance = Aspose.Words.Saving.PdfCompliance.Pdf15,
CreateNoteHyperlinks = true,
ExportDocumentStructure = true,
//FontEmbeddingMode = Aspose.Words.Saving.PdfFontEmbeddingMode.EmbedAll,
ImageCompression = Aspose.Words.Saving.PdfImageCompression.Jpeg,
TextCompression = Aspose.Words.Saving.PdfTextCompression.None,
SaveFormat = Aspose.Words.SaveFormat.Pdf
};
using (MemoryStream input = new MemoryStream())
{
document.Save((Stream)input, (Aspose.Words.Saving.SaveOptions)options);
using (Aspose.Pdf.Document document2 = new Aspose.Pdf.Document(input))
{
input.Flush();
List<int> list = new List<int>();
for (int i = 1; i <= pageCount; i++)
{
list.Add(i);
}
document2.Save(strOutFile);
count = document2.Pages.Count;
document2.FreeMemory();
document2.Dispose();
}
input.Close();
input.Dispose();
}
Nana in the city任务单1.zip (475.3 KB)
Nana in the city任务单12.pdf (378.0 KB)
C(18POSK_7}5I7_(QESO0.png (160.6 KB)