How to implement scrolling screenshots on macos?

[self.scrollView lockFocus];

NSImage image = [[NSImage alloc] initWithData: [(NSView ) self.scrollView.documentView dataWithPDFInsideRect:bounds]];

[self.scrollView unlockFocus];

if the scrolling view is in the same application, it can be achieved in the above way, but if it is not in the same application, how can I get the NSScrollView object? Whether the corresponding NSView? can be obtained through id

Mar.14,2021

you can refer to this library, which is the
https://github.com/dudongge/D.

you need.
Menu