Hello,
I am having trouble when I try to convert a DOCX file to PDF when it contains a Html Table in an inline text container.
In the output PDF-document the Html Table is displayed with the Html code instead of the table rendered as Html as it is in the origin DOCX file.
When making a small modification in the original DOCX file (by adding an x-character in the file) the output PDF is rendered as expected.
See the program code following the post for a way to reproduce the issue. See the attached files for output results from the program.
I am using Aspose.Words v15.1.0.0.
thanks, Henrik
namespace AsposeWordsConverter
{
using System.Diagnostics;
using System.IO;
using Aspose.Words;
using Aspose.Words.Saving;
class Program
{
static void Main(string[] args)
{
if (args.Length
{
Trace.WriteLine("Invalid number of arguments: Expecting AsposeWordsConverter.exe ");
return;
}
string l_sourceFile = args[0];
if (!File.Exists(l_sourceFile))
{
Trace.WriteLine("Specified source file does not exist: " + l_sourceFile);
return;
}
string l_targetFile = l_sourceFile + ".pdf";
Aspose.Words.Document l_document = new Document(l_sourceFile);
l_document.UpdateFields();
using (var l_resultStream = new FileStream(l_targetFile, FileMode.CreateNew))
{
l_document.Save(l_resultStream, new PdfSaveOptions { Compliance = PdfCompliance.PdfA1b });
}
}
}
}