We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cannot load image using paragraph.AppendPicture()

Thread ID:





93826 Apr 7,2010 01:03 AM UTC Apr 9,2010 04:40 AM UTC Silverlight 2
Tags: DocIO
Phuoc Nguyen
Asked On April 7, 2010 01:03 AM UTC

Cannot load image using paragraph.AppendPicture(). Please help, thanks!

var imageData = "";
var paragraph = new Syncfusion.DocIO.DLS.WParagraph(document);
var logoBinary = System.Convert.FromBase64String(imageData);

Error Message:
MM.SalesTools.Infrastructure.DocBuilderTests.DocBuilderTests.DocBuilder_GenerateDocumentTest threw exception: System.NullReferenceException: Object reference not set to an instance of an object..

Error Stack Trace:
Syncfusion.DocIO.DLS.WPicture.LoadImage(Byte[] imageBytes)
Syncfusion.DocIO.DLS.WParagraph.AppendPicture(Byte[] imageBytes)

Phuoc Nguyen
Replied On April 7, 2010 01:48 AM UTC

Using AppendPicture(Stream imageStream) raise the following exception. Please help!

Error Message:
Test method MM.SalesTools.Infrastructure.DocBuilderTests.DocBuilderTests.DocBuilder_GenerateDocumentTest threw exception: System.TypeInitializationException: The type initializer for 'System.Windows.DependencyObject' threw an exception. ---> System.UnauthorizedAccessException: InvalidCrossThreadAccess.

Error Stack Trace:
System.Windows.DependencyObject..ctor(UInt32 nativeTypeIndex, IntPtr constructDO)
System.Windows.DependencyObject..ctor(UInt32 nativeTypeIndex)
Syncfusion.DocIO.DLS.Entities.Image..ctor(Stream stream)
Syncfusion.DocIO.DLS.WPicture.LoadImage(Stream imageStream)
Syncfusion.DocIO.DLS.WParagraph.AppendPicture(Stream imageStream)

Poornima R [Syncfusion]
Replied On April 9, 2010 04:40 AM UTC

Hi Phuoc,

Sorry for the long delay in getting back to you.

We have prepared the sample for your requirement.Could you please find the samlpe from the below. Try running the sample and let us know if this helps.If still the issue exist, Could you please provide us with the entire sample you are using to reproduce ths issue.So that we can analyse the issue and provide you with clear details.

Sample link:

Please let us know if you have any queries.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon