Part of image removing while cropping PDF page

Hi team,

I am trying to crop image from PDF page, while cropping part of the images is also cropping.
Below the the code I am using.

foreach (Aspose.Pdf.Page page in docPdf.Pages)
{
Aspose.Pdf.Rectangle contextBox = page.CalculateContentBBox();
page.CropBox = contextBox;
page.MediaBox = contextBox;

    using (FileStream imageStream =
      new FileStream(imagePath, FileMode.Create))
    {
      Resolution resolution = new Resolution(350);
      JpegDevice jpegDevice = new JpegDevice(resolution, 100);
      jpegDevice.Process(page, imageStream);
      imageStream.Close();
    }
  }

Attached sample files.samples.zip (2.0 MB)

@mallikarjun.sidveer

We have been able to replicate the issue in our environment and logged it as PDFNET-47831 in our issue tracking system. We will further look into details of it and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

1 Like

Hi Asad,

Is there any alternative approach i can take until this issue is resolved?

Thanks,

@mallikarjun.sidveer

You may please try extracting images from PDF document and combine them using Aspose.Imaging in case it helps achieving your requirements. We will further inform you as soon as the logged issue is resolved.

Hi Team,

Any update on this issue??

Thanks,
Mallikarjun

@mallikarjun.sidveer

Regretfully there is no update yet as the issue was logged under free support model and will be investigated on first come first serve basis. We will surely inform you as soon as we have some additional updates in this regard. Please spare us some time.

We are sorry for the inconvenience.