Hi,
I am trying to create image using pdf but it is throwing an exception - width and height should be greater then zero, but was: -2147483648 x -2147483648 (Parameter ‘bounds’)
Aspose.Pdf.Document docPdf = new Aspose.Pdf.Document(@"C:\chart_1.pdf");
for (int counter = 1; counter <= docPdf.Pages.Count; counter++)
{
var page = docPdf.Pages[counter];
Aspose.Pdf.Rectangle contextBox = page.CalculateContentBBox();
page.CropBox = contextBox;
page.MediaBox = contextBox;
string imagePath = @"C:\chart_1.jpeg";
using (FileStream imageStream = new FileStream(imagePath, FileMode.Create))
{
Aspose.Pdf.Devices.Resolution jpgResolution = new Aspose.Pdf.Devices.Resolution(300);
Aspose.Pdf.Devices.JpegDevice jpgDevice = new Aspose.Pdf.Devices.JpegDevice(jpgResolution, 100);
jpgDevice.Process(page, imageStream);
imageStream.Close();
}
}
@amolm
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFNET-54573
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
The ticket was logged recently in our issue tracking system and it is pending for an initial analysis. It will be investigated and resolved on a first come first serve basis. We will surely inform you once we make some progress towards its resolution. Please spare us some time.
We are sorry for the inconvenience.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.