We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

.NET Core, DocIO and PDF Conversion - Custom Document properties removed


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:



That is what the result look like:


That is what my code looks like:

         static void Main(string[] args)

            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");



6 Replies

DB Dilli Babu Nandha Gopal Syncfusion Team February 27, 2019 11:13 AM UTC

Hi Adrein, 

Thank you for contacting Syncfusion support. 

We could see the reported issue in the given attachment and suspect that the issue might be document specific i.e., elements in the document. Kindly share us the issue causing Word document which will be helpful for us to provide you a prompt and quick solution. 

Note: If you have any confidential data in your Word document, please replace with some dummy data and provide us the same or send to support@syncfusion.com by mentioning this forum ID in subject line. We just need your document to recreate the problem you face. 

Dilli babu. 

AL Adrien Long February 27, 2019 03:34 PM UTC

Thank you for the answer.
I have sent a mail to support@syncfusion.com with a document to recreate the problem.

Best regards,

DB Dilli Babu Nandha Gopal Syncfusion Team February 28, 2019 08:40 AM UTC

Hi Adrien, 

Thank you for sharing us the details. 

We can reproduce the reported issue with “DOCProperty fields are preserved improperly in Word to PDF conversion”. We suspect this to be defect and analyzing on it. We will update you the further details by 4 March 2019. 

Dilli babu. 

DB Dilli Babu Nandha Gopal Syncfusion Team March 4, 2019 05:07 PM UTC

Hi Adrien,

We have fixed the reported
“DocProperty value not preserved properly in Word to PDF” and the patch for the fix can be downloaded from the following link

Recommended approach - exe will perform automatic configuration
Please find the patch setup from below location:

Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from below location:

Please find the NuGet packages from below location:

Assembly Version:

Installation Directions :
This patch should replace the files “Syncfusion.DocIO.Portable.dll” under the following folder.
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\ \precompiledassemblies\\

To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.

To change how you receive bug fixes, ask your license management portal admin to change your project’s patch delivery mode.

Please note that we have created this patch for version specifically to resolve the issue reported in the forum 142931

If you have received other patches for the same version for other products, please apply all patches in the order received.

This fix will be included in our 2019 Volume 1 release which will be available at end of March 2019.

Please let us know if you have any other questions.

Dilli babu. 

AL Adrien Long March 6, 2019 09:49 AM UTC

Hi Dilli,

I followed the recommended approach and tried again.

The DOCPROPERTYs  are well preserved in the generated PDF but not the PROPRIETEDOCs ...

Wasn't the patch supposed to fix the PROPRIETEDOC as well?



DB Dilli Babu Nandha Gopal Syncfusion Team March 6, 2019 06:24 PM UTC

Hi Adrien, 

We have fixed the reported issue which will update PROPRIETEDOC. Please find the document which was generated at our end. 

We suspect the patched assembly are not referred properly in your application, so the reported issue is still reproduced at your end. Please remove the assemblies from GAC using Syncfusion Assembly Manager which is available in the Syncfusion Dashboard and also, delete bin and obj folders of the sample. Then install the latest patch assemblies again using the Syncfusion Assembly Manager and ensure the file version of “Syncfusion.DocIO.Base.dll” ends with “225” i.e., is same as 16.4140.0.225 which is referred in your project. This could resolve the issue. 

If you are referring the NuGet, then kindly remove Syncfusion.DocIO.Net.Core folder in  C:\Users\{XXX}\.nuget\packages then install the patched NuGet package. 

Dilli babu. 

Live Chat Icon For mobile
Up arrow icon