How to isolate just images in a rectangular area?

71 views
Skip to first unread message

Ryan

unread,
Sep 20, 2016, 7:11:05 PM9/20/16
to PDFTron PDFNet SDK
Question:

How to get just the images that are contained in a region, without getting other ones that might be partially included?

Answer:

Attached is a modified ElementEdit sample, and input file, that does this.

Further improvement you could do, is to crop the page to just the minimal bounding box, and then export to image.

page.SetCropBox(page.GetVisibleContentBox());
pdfdraw
.Export(page, "out.png", "PNG");


ElementEditTest.cs
Reply all
Reply to author
Forward
0 new messages