Hello!
I'm trying to generate a PDF from a Word file using the .NET Core version of DocIO. The docx file I'm using has a lot of Custom Document properties. The problem is that these Custom Document properties are all missing in the generated PDF file.
That is what a page with Custom Document properties look like:
https://www.dropbox.com/s/q15tieit8es4ru6/CustomProperties.JPG?dl=0
https://www.dropbox.com/s/nr002sc0cwyj9cb/CustomProperties2.JPG?dl=0
That is what the result look like:
https://www.dropbox.com/s/ugrlbx8u4zg54du/CustomPropertiesResult.JPG?dl=0
That is what my code looks like:
static void Main(string[] args)
{
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("MY_KEY");
string inputFile = "input_file_path";
string outputFile = "Sample Output.docx";
File.Copy(inputFile, outputFile, true);
FileStream fileStream = new FileStream(outputFile, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite);
WordDocument doc = new WordDocument(fileStream, FormatType.Docx);
DocIORenderer converter = new DocIORenderer();
converter.Settings.AutoDetectComplexScript = true;
converter.Settings.EmbedFonts = true;
converter.Settings.EmbedCompleteFonts = true;
PdfDocument pdfDocument = converter.ConvertToPDF(doc);
FileStream pdfStream = File.Create("output.pdf");
pdfDocument.Save(pdfStream);
pdfDocument.Dispose();
pdfStream.Dispose();
doc.Dispose();
fileStream.Dispose();
}