We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to crop portions of PDF document and save it as image in WPF PDFViewer?

Platform: WPF |
Control: PdfViewer

WPF PDFViewer control allows the user to include rectangles and save the portions as image.

View sample in GitHub.

Steps to be followed:

1. Run the sample. The sample will load the first page of the PDF document.

2. To add a rectangle, click the button ‘Include Rectangle’ which is on the right side. This will add the rectangle at the top-left corner, in the default color.

3. The rectangle can be moved and resized within the scope of the Page.

4. To include rectangle with a different color, select the color from the brush color and click on Include Rectangle button. Multiple rectangles can be included in a single page.

5. To crop the rectangle portion as image, click on the ‘Crop’ button which is at the Right bottom. This will save the image(s) to the Output folder. The cropped images will be saved automatically, if we move to previous or next page of the PDF document.

6. To move to previous or next page of the document, use the previous and next buttons which are present in the Left and Right sides of the display respectively.

7. To open a new document, Use the ‘Open’ button at the right-bottom of the Window.

Crop portion in WPF PDFViewer

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile