We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cannot add new section after a multi-columns section

Got System.NullReferenceException when adding a new section which is not a page after another section which has an image inside.

var pdf = new Pdf();
const string webImgUrl = @“https://www.google.co.nz/images/srpr/logo11w.png”;
var section = pdf.Sections.Add();
var img = new Image { ImageInfo = { File = webImgUrl, ImageFileType = ImageFileType.Png } };
section.Paragraphs.Add(img);
section.ColumnInfo.ColumnCount = 2;
section.Paragraphs.Add(new Text(“Text 1”));

var thirdSection = pdf.Sections.Add();
thirdSection.IsNewPage = false;
using (var stream = new MemoryStream())
{
pdf.Save(stream);
using (var fileStream = File.Open(@“C:\temp\Image_Error.pdf”, FileMode.Create))
stream.CopyTo(fileStream);
}

Hi Patrick,


Thanks for your inquiry. I have tested the scenario and noticed the reported exception, so logged a ticket PDFNEWNET-39068 in our issue tracking system for further investigation and resolution. We will notify you as soon as it is resolved.

We are sorry for the inconvenience caused.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-39068) have been fixed in Aspose.Pdf for .NET 11.1.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.