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.

How to replace an Image

Thread ID:

Created:

Updated:

Platform:

Replies:

125998 Sep 16,2016 08:36 AM Sep 19,2016 07:06 AM UWP 1
loading
Tags: Pdf
Raymond Osterbrink
Asked On September 16, 2016 08:36 AM

Hi,
I try to replace an Image in my PDF, but it seems this function is not supported in UWP, could this be?
The solution I found comes from an article about MVC:

            //Load the PDF document
            PdfLoadedDocument doc = new PdfLoadedDocument(ResolveApplicationDataPath("imageDoc.pdf"));

            //Create an image instance
            PdfBitmap bmp = new PdfBitmap(ResolveApplicationImagePath("Essen PDF.gif"));

            //Replace the first image in the page.
            doc.Pages[0].ReplaceImage(2, bmp);

            bmp = new PdfBitmap(ResolveApplicationImagePath("Essen DocIO.gif"));
            doc.Pages[1].ReplaceImage(0, bmp);

            bmp = new PdfBitmap(ResolveApplicationImagePath("Essen XlsIO.gif"));
            doc.Pages[1].ReplaceImage(1, bmp);
But when I look inside my first Pdf-Document Page, it does not offer the Replace-Method.
In case this is not implemented yet, is it somehow possible to access the images on my document page, for e.g. checking their x and y coordinates (and even better name) so I might override them with:
            doc.Pages[1].Graphics.DrawImage(bmp, new PointF(x,y)

Attachment: SyncfusionPDF_43342929.zip

Chinnu Muniyappan [Syncfusion]
Replied On September 19, 2016 07:06 AM

Hi Raymond, 
 
We would like to inform you that we don’t have this support in “Need to add the replace image support UWP platform” currently and so have logged feature report regarding this. A support incident to track the status of this feature has been created under your account. Please log on to our support website to check for further updates 
 
 
Please let me know if you have any questions. 
 
Regards, 
Chinnu 


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.

;