Getting Divide by Zero and Access Denied errors
Posted: 2014-07-16T08:09:35-07:00
We're converting PDF files to PNG files. We're getting An exception of type 'System.DivideByZeroException' occurred in Magick.NET-x86.dll but was not handled in user code if we use
We get An unhandled exception of type 'System.AccessViolationException' occurred in Magick.NET-x86.dll if we use
We get no errors if we use:
I'd be happy to send the PDF file is needed. Some PDFs give no errors with the first code above.
Code: Select all
var s = new MagickReadSettings();
s.Density = new MagickGeometry(300, 300);
using (var images = new MagickImageCollection())
{
images.Read(inputPdfPath, s);
Code: Select all
var s = new MagickReadSettings();
s.Density = new MagickGeometry(150, 150);
using (var images = new MagickImageCollection())
{
images.Read(inputPdfPath, s);
Code: Select all
var s = new MagickReadSettings();
s.Density = new MagickGeometry(75, 75);
using (var images = new MagickImageCollection())
{
images.Read(inputPdfPath, s);