Hi, I wonder if you can help with my issue
I have a problem when I try to convert a docx to pdf. The error I get is the following: The type initializer for 'Telerik.Windows.Documents.Fixed.Model.FixedDocumentDefaults' threw an exception
I use the following code:
byte[] renderedBytes2 = null;
Telerik.Windows.Documents.Common.FormatProviders.IFormatProvider<RadFlowDocument> formatProvider2 = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();
using (MemoryStream memoria2 = new MemoryStream())
{
formatProvider2.Export(document, memoria2);
renderedBytes2 = memoria2.ToArray();
//string nombre = "EstudioBNF.pdf";
GuardarHistoria(nombrepdf, memoria2);
}
The things to note are:
* No exception is thrown when the project is run from Visual Studio..
*The exception is thrown at runtime