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. Image for the cookie policy date

How to replace an Image

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

1 Reply

CM Chinnu Muniyappan Syncfusion Team September 19, 2016 11:06 AM UTC

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. 

Live Chat Icon For mobile
Up arrow icon