When a format string of type: _ * # ##0_ ;_ * -# ##0_ ;_ * "-"??_ ;_ @_ is set through code and the culture settings of the machine are set so that the number grouping symbol is space, the resulting format string comes out incorrect on export: _,*,# ##0_,;_,*,-# ##0_,;_,*,"-"??_,;_,@_,
This will happen every time the symbols in-between and after _ and * coincide with the number group separator.
Hi there I have a pdf and whenever I try to Import the PDF file into PdfFormatProvider.Import method for flattening purposes, it throws null reference exception.
I have added a sample .net project with PDF added as source. You just need to run the project on your end. I am using version 2023.3.1106 of document processing library.
I am using ASP.NET 4.8 framework.
Thanks
A NullReferenceException is thrown when copying a sheet containing a chart with Marker whose FIll is null.
There is a workaround which should be applied before copying the sheet:
foreach (FloatingChartShape chart in wsPureCompTemplate.Charts)
{
foreach (SeriesGroup seriesGroup in chart.Chart.SeriesGroups)
{
foreach (SeriesBase series in seriesGroup.Series)
{
LineSeries lineSeries = series as LineSeries;
if (lineSeries != null && lineSeries.Marker != null && lineSeries.Marker.Fill == null)
{
lineSeries.Marker.Fill = new NoFill();
}
ScatterSeries scatterSeries = series as ScatterSeries;
if (scatterSeries != null && scatterSeries.Marker != null && scatterSeries.Marker.Fill == null)
{
scatterSeries.Marker.Fill = new NoFill();
}
}
}
}
I can't share the document publicly.
Stack trace:
System.ArgumentException: Unexpected value = 100.0%
at Telerik.Windows.Documents.Flow.FormatProviders.Docx.Model.Types.FractionalValueConverter.ConvertFromString(String value)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Core.ConvertedOpenXmlAttribute`1.SetStringValue(IOpenXmlImportContext context, String value)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.ReadAttributes(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.Read(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.ReadChildElements(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.Read(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.ReadChildElements(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.Read(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.ReadChildElements(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.Read(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.ReadChildElements(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.Read(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.ReadChildElements(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.Read(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.ReadChildElements(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.Read(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.ReadChildElements(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.Read(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Parts.OpenXmlPartBase.Import(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.Flow.FormatProviders.Docx.Model.Parts.HeaderPart.Import(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Parts.OpenXmlPartBase.Import(Stream stream, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.OpenXmlImporter`1.ImportPartFromArchive(ZipArchiveEntry zipEntry, PartBase part, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.OpenXmlImporter`1.Import(Stream input, IOpenXmlImportContext context)
at Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider.ImportOverride(Stream input)
at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Import(Stream input)
InvalidCastException 'Unable to cast object of type 'EffectContainerElement' to type 'EffectListElement' is thrown on import.
As a workaround, you can either use the old version of the assemblies (R2 2022) or you can set ImportSettings.SkipShapes of the DocxFormatProvider to true.