Hi GemBox Team,
I am using GemBox.Bundle in version 51.0.1257-hotfix and I receive the following error:
System.NullReferenceException: Object reference not set to an instance of an object.
at⸮. , )
at . , , ⸮ , )
at.( , , , , , , ⸮ )
at.( , , ⸮ , , Double )
at .( , , ⸮ )
at .( , Int32, , ⸮ )
at .( , , ⸮ )
at .⸮ )
at ⸮.( , ⸮, , ⸮ , , )
at .( , ⸮[], ⸮ , , )
at .( , Int32, , ⸮ , ⸮ , )
at .( , , Int32 )
(I at .nt32 , Object, Object )
(I at GemBox.Spreadsheet.ExcelFilePaginator.ejdzwun39fbbvtwqjbnjxdzxum3jetzhnt32 , Object, Object )
at ..nt32 , Object, Object )
at ( , Int32, Object )
at .(Int32 , Size&, Double& )
at (Int32 )
at ..( )
at .. )
at . , String, Stream )
at .( , , Stream )
at GemBox.Spreadsheet.ImageSaveOptions.( , Stream, Boolean )
at GemBox.Spreadsheet.ImageSaveOptions.zaz4g8cqbty6apf5nnajkhshhk62a7u9 , Stream, Boolean )
at GemBox.Spreadsheet.ExcelFilePage.Save(Stream stream, SaveOptions options)
at GemBoxPoc.GemBoxSpreadsheetService.ConvertFile(String inputPath, String outputDirectory)
when running this application code:
public static void ConvertFile(string inputPath, string outputDirectory)
{
var spreadsheet = ExcelFile.Load(inputPath);
var pages = spreadsheet.GetPaginator(new PaginatorOptions { SelectionType = SelectionType.EntireFile }).Pages;
for (var index = 0; index < pages.Count; index++)
{
var fileName = $"Spreadsheet_Page-{index}.bmp";
var page = pages[index];
using var stream = new FileStream(Path.Combine(outputDirectory, fileName), FileMode.Create);
page.Save(stream, new ImageSaveOptions(ImageSaveFormat.Bmp));
}
}
with some documents that produce more than one output page.
However it does not occur with every document, so if necessary I can send you my test file.
Could you have a look at it?
Kind regards,
Sarah