Here we highlight a set of images in a source document by
drawing a red rectangle around each one.
string src = Server.MapPath("mypics/Acrobat.pdf");
string dst = Server.MapPath("HighlightedImages.pdf");
using var doc = new Doc();
doc.Read(src);
doc.Color.SetRgb(255, 0, 0);
doc.Width = 0.1;
var op = new ImageOperation(doc);
op.PageContents.AddPages();
var images = op.GetImageProperties();
foreach (var img in images) {
foreach (var rend in img.Renditions) {
rend.Focus();
doc.FrameRect();
}
}
doc.Save(dst);
Dim theSrc As String = Server.MapPath("mypics/Acrobat.pdf")
Dim theDst As String = Server.MapPath("HighlightedImages.pdf")
Using doc As New Doc()
doc.Read(theSrc)
doc.Color.SetRgb(255, 0, 0)
doc.Width = 0.1
Dim op As New ImageOperation(doc)
op.PageContents.AddPages()
Dim images As IList(Of ImageProperties) = op.GetImageProperties()
For Each pl As ImageProperties In images
For Each plc As ImageRendition In pl.Renditions
plc.Focus()
doc.FrameRect()
Next
Next
doc.Save(theDst)
End Using