Get snapshot from Pdf view

Hi All,

i'm trying to get snapshot from the pdf view. i need to select any area within the pdf view and need to save particular selection as jpg. please be kind enough to guide me on this.

Thank you...

You can get the buffer of the client region of PDFView using “const char* GetBuffer()”. In order to make sure that buffer is ready, you can call “UpdateBuffer()” first. To query the width, height and stride of the buffer, you will use “GetBufferWidth()”, “GetBufferHeight()” and “GetBufferStride()”.

With all the necessary information available, you can easily select the Region of Interest (ROI) from the buffer and use a jpeg library to save the content in ROI to a jpeg file.

It is worth mentioning that a pixel data in the returned buffer is stored in 8 bit per component BGRA (blue-green-red-alpha) format.

Thank you very much for your quick response. I'm a beginner on c#. can you give some sample codes that can i use? Also i want to know how do i know this downloaded DLL expiration date(How many days remaining) ?

Note that PDFView has been removed from .Net version of PDFNet in the latest release, and PDFViewCtrl can be used instead. However, PDFViewCtrl doesn’t provide functions for users to retrieve its buffer. One possible way is to get the snapshot from the Control class ( ) since PDFViewCtrl is derived it. Please take a look at to see how to take snapshot from Control.