We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Could not load file or assembly Aspose.Font

We are getting this error when trying to convert our PDF to PDF/A-3b.
Error and Actual Code below:
Error
System.IO.FileNotFoundException: Could not load file or assembly ‘Aspose.Font, Version=16.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The system cannot find the file specified.
File name: ‘Aspose.Font, Version=16.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’
at ? .[1](FontCollection [1], Page


)
at ? .[1](Page [1], [1]


)
at ? .()
at ? . ? ??()
at ? .
at Aspose.Pdf.Document.[1](XmlTextWriter [1], PdfFormat


, Boolean , ConvertErrorAction )
at Aspose.Pdf.Document.Convert(Stream outputLogStream, PdfFormat format, ConvertErrorAction action)

Code Snippet
public class DocumentManager
static DocumentManager()
{
new Aspose.Pdf.License().SetLicense(@“Aspose.Pdf.lic”);
}

public byte[] ConvertToPdfA3(byte[] document)
{
Aspose.Pdf.Document pdfA3 = new Aspose.Pdf.Document(new MemoryStream(document));
MemoryStream outLog = new MemoryStream();

        if(!pdfA3.Convert(outLog, PdfFormat.PDF_A_3B, ConvertErrorAction.Delete))
        {
            StreamReader sr = new StreamReader(outLog);
            throw new ApplicationException(string.Format("Failed to Convert: ", sr.ReadToEnd());
        }

        MemoryStream outStream = new MemoryStream();
        pdfA3.Save(outStream, SaveFormat.Pdf);

        return outStream.ToArray();
    }

@nwynohradnyk

Thanks for contacting support.

I am afraid that you are using a quite older version of Aspose.Pdf for .NET, whereas it is always and strongly recommended to use latest version of the API as it contains more fixes and enhancements. Furthermore, the issue you are experiencing, has already been reported and resolved in newer version(s) of the API. Please download Aspose.Pdf for .NET 17.10, which is latest version and try to run scenario again at your side.

In case you still face any issue, please share your sample PDF document along with your environment details (i.e Application Type, Target Framework, OS Version, etc), so that we can test the scenario in our environment and address it accordingly.