Error open docx in pdfviewer

Hi Syncfusion Team,

Please assist. Found an error as below, Attached document.

System.TypeLoadException: Method 'GetTextureBrush' in type 'Syncfusion.DocIORenderer.RenderHelper' from assembly 'Syncfusion.DocIORenderer.Portable, Version=19.4200.0.54, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89' does not have an implementation.

   at Syncfusion.DocIORenderer.DocIORenderer..ctor()


Code:

using (MemoryStream memWord = new MemoryStream(file.FileBytes))

                                {

                                    var wordDocument = new WordDocument(memWord, Syncfusion.DocIO.FormatType.Automatic);

                                    // Creates a new instance of DocIORenderer class.

                                    DocIORenderer render = new DocIORenderer();

                                    // Converts Word document into PDF document.

                                    PdfDocument pdf = render.ConvertToPDF(wordDocument);

                                    // Save the PDF document.

                                    pdf.Save(stream);

                                    render.Dispose();

                                    pdf.Close();

                                }


Attachment: Aarhus_convention_dd559e56.zip

2 Replies

AN Anto Nihil Sahaya Raj Syncfusion Team June 2, 2022 09:08 AM UTC

Hi Kuan,

We have tried to reproduce the reported problem using the given details. But it works properly at our end. For your reference, we have attached the sample application which we tried to reproduce the reported problem at our end. We suggest you to try the attached sample at your end.

Note: Please find the input Word document in “Data” folder of the below sample location.


If the issue is not reproduced using the attached sample application at your end, then could you please modify the attached sample as an issue reproducible sample application. Thereby, we will proceed further to replicate the same problem at our end and will provide you appropriate solution at the earliest.


Regards,
Anto Nihil S


Attachment: ConsoleApp1_c4c5f3b1.zip


KL Kuan Long Khiu June 2, 2022 12:30 PM UTC

Hi  Anto Nihil S,


It works perfectly after update to the latest version. Thanks.


Loader.
Up arrow icon