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

Free Support Forum - aspose.com

How to remove and get infos of Text/Image watermark added by Adobe Acrobat, get infos of ImageStamp added by Adobe Acrobat

H, Support:
Pleae refer to the demo.pdf.
There is a text watermark added by Adobe Acrobat, how to remove it? how to get its (x,y) position and its text content?
There is a image watermark added by Adobe Acrobat, how to remove it?how to get its wxh size and (x,y) position? as well as how to save it as jpg file?
There is a image stamp added by Adobe Acrobat, how to save it as jpg file?

in addition, if the text/image watermark was added by Word, how to remove them? how to get its (x,y) position, its text content,its wxh size, save it as jpg file.
Demo.pdf (140.0 KB)

@ducaisoft

We have logged an investigation ticket in our issue tracking system for your requirements. The ticket is logged under the ID PDFNET-48619. We tried using following code snippet but could not achieve all of your objectives.

Document Pdf = new Document(dataDir + "Demo.pdf");
            foreach (Page page in Pdf.Pages)
            {
                int n = Pdf.Pages[1].Resources.Images.Count;
                ImagePlacementAbsorber abs = new ImagePlacementAbsorber();
                page.Accept(abs);
                double PH = page.Rect.Height;
                int index = 0;
                foreach (ImagePlacement imagePlacement in abs.ImagePlacements)
                {
                    double x = imagePlacement.Rectangle.LLX;
                    double H = imagePlacement.Rectangle.Height;
                    double y = PH - imagePlacement.Rectangle.LLY - H;
                }
            }

            Facades.PdfContentEditor pdfContentEditor = new Facades.PdfContentEditor();

            // Bind input PDF file
            pdfContentEditor.BindPdf(Pdf);

            // Get Stamp info for the first stamp
            Facades.StampInfo[] infos = pdfContentEditor.GetStamps(1);

            // Get the image from Stamp Info           
            System.Drawing.Image image = infos[0].Image;

            // Save the extracted image
            image.Save(dataDir + "image_out.jpg");

We will investigate on how all of your requirements can be met and share our feedback with you as soon as the ticket is resolved. Please spare us some time.

We are sorry for the inconvenience.