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.
Unfortunately, activation email could not send to your email. Please try again.

winrt attempt to insert image into pdf

Thread ID:

Created:

Updated:

Platform:

Replies:

106564 Jan 16,2013 12:06 AM Jan 17,2013 07:44 AM Windows Forms 1
loading
Tags: PDF
BEE
Asked On January 16, 2013 12:06 AM

I would like to insert code into a pdf document but after I convert the image file to stream, I get the ArgumentNullException.

Buffer cannot be null.

Parameter name: buffer

Code:
using (PdfLoadedDocument pdfDocument = new PdfLoadedDocument(await file.OpenStreamForReadAsync()))
{
    var imgFile = await installedFolder.GetFileAsync(@"PathToImage\MyImage.png");

    using (Stream ms = await imgFile.OpenStreamForReadAsync())
    {
        pdfDocument.Pages[0].Graphics.DrawImage(PdfImage.FromStream(ms), 0, 0, 300, 170);
    }
}

George Livingston [Syncfusion]
Replied On January 17, 2013 07:44 AM

Hi Bee,

Thank you for your interest in Syncfusion product.

Currently we do not support PNG images, however we have added a feature request to implement this feature in any our upcoming release. We will let you know once the feature has been implemented.

Please let us know if you have any questions.

Regards,

George


CONFIRMATION

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.

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.

;