Generate a sample document with RadPdfProcessing and export it with AES-256 encryption. Try to open it on an iPhone with the default Pdf Viewer of iOS. The document is empty. However, the mobile version of Adobe for iOS opens the document successfully.
Read the documentation for CancelationTokenSource.CancelAfter:
this method will throw an ArgumentOutOfRangeException when: delay.TotalMilliseconds is less than -1 or greater than Int32.MaxValue (or UInt32.MaxValue - 1 on some versions of .NET). Note that this upper bound is more restrictive than TimeSpan.MaxValue.
----------------------------------------------------
your code in CancelationTokenSourceFactory.CreateTokenSource does this check:
if (timeSpan.HasValue && timeSpan.Value != TimeSpan.MaxValue)this check for TimeSpan.MaxValue seems totally pointless here, if timeSpan is anything between ~2147483647 and 922337203685476 milliseconds long this will still just throw a ArgumentOutOfRangeException.
I suspect that this check was intended as a way to prevent creating a cancellation timer that never triggers in the CancellationTokenSource, which should look like this:
if (timeSpan.HasValue && timeSpan != Timeout.InfiniteTimeSpan) //Timeout.InfiniteTimeSpan is -1 millisecondsWhen creating a data bar conditional formatting with middle axis, a plain data bar with left axis is created instead. Using the following code:
var dataBarValueContext = new DataBarValueContext
{
MaximumValue = new NumericValue(1),
MinimumValue = new NumericValue(-1)
};
// Create the rule and set the desired formatting
var rule = new DataBarRule(dataBarValueContext)
{
UseGradientFill = false,
Direction = DataBarDirection.Context,
FillColor = ThemableColor.FromColor(Colors.Green),
NegativeFillColor = ThemableColor.FromColor(Colors.Red),
ShowBarsOnly = true,
AxisPosition = DataBarAxisPosition.Automatic
};
var conditionalFormat = new ConditionalFormatting(rule);
worksheet.Cells[0, 0, 1, 0].AddConditionalFormatting(conditionalFormat);
worksheet.Cells[0, 0].SetValue(0.5);
worksheet.Cells[1, 0].SetValue(-0.5);
The expected value is this:
The result value is instead:
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();
}
}
}
}