|
|
If you need to crop PDF pages before saving them as images, I’d crop the unwanted margins or sections first and then export the pages. That way, the image contains only the area you actually need.
To quickly crop a PDF, you can use the Softaken Crop PDF Tool, which is an offline utility and helps you effortlessly crop a PDF file. It is built to select the required crop area and save the adjusted PDF pages without manually editing each page. Then you can export the cropped pages as images as needed. Try it on one or two pages first to make sure the crop area is correct before processing the complete PDF.
|
|
|
Thanks! I had solved it another way that let me save it cropped as I rendered the pages. But I definately appreciate this code. I can use it too.
Thanks again!
|
|
|
You may use standard .Net image to crop already rendererd pages. Code: using (var originalImage = Image.FromFile(@"d:\0\9\page01.PNG"))
{
var rectangleForCrop = new Rectangle(50, 50, 350, 350);
using (var croppedImage = new Bitmap(rectangleForCrop.Width, rectangleForCrop.Height))
{
using (var g = Graphics.FromImage(croppedImage))
{
g.DrawImageUnscaledAndClipped(originalImage, rectangleForCrop);
}
croppedImage.Save(@"d:\0\9\page01_cropped.png", ImageFormat.Png);
}
}
Or you can render the desired page area to an image of any size. An example of similar task may be found here https://forum.patagames....functionality-as-Acrobat
|
|
|
I have no problems saving a pdf document to a series of imgages of the full page, but don't have any idea how to apply a crop to all pages and save the pages as images. Any examples you can offer would be helpful. I am using the trial version so if it can't be done in that, please let me know. Thanks for any help you can provide!
|
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close