Use Aspose.PDF for .NET in .NET Core 3.0 - IIndexBitmapConverter Exception

Hi

I’m trying to create a custom IIndexBitmapConverter class but I get:

The type ‘Bitmap’ exists in both ‘Aspose.Drawing, Version=20.7.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ and ‘System.Drawing.Common, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’

Code (copy - paste from : Convert PDF to Different Image Formats in C#|Aspose.PDF for .NET)

using Aspose.Pdf;
using System;
using System.Drawing;

namespace Papyros.Servers.Extract.Converters
{
public class WinAPIIndexBitmapConverter : IIndexBitmapConverter
{
public Bitmap Get1BppImage(Bitmap src)
{
return CopyToBpp(src, 1);
}

    .... etc ....
}

}

@km2020

Please try to use complete Class name with namespace in order to prevent the issue e.g. System.Drawing.Bitmap. In case issue still persists, please share a sample console application in .zip format so that we can test the scenario in our environment and address it accordingly.

Hi,

Removed the Aspose.Drawing package and it worked.

1 Like

@km2020

It is good to know that your issue has been sorted out. Please feel free to let us know in case of further query.