Converting PDF to PDF/2A using GroupDocs.Conversion

Converting pdf to PDF/2A file with options don’t work
public byte[] CreateOutput(byte[] content)
{
using var stream = new MemoryStream();
var inputStream = () => GetFileStream(content);
using var converter = new Converter(inputStream);
var options = new PdfConvertOptions()
{
PageSize = PageSize.A4,
PdfOptions = new PdfOptions
{
PdfFormat = PdfFormats.PdfA_2A,
DocumentInfo = new PdfDocumentInfo
{
Producer = Producer,
Title = Title,
}
}
};
converter.Convert(() => stream, options);
return stream.ToArray();
}
when the input byte array is pdf file with more than one page throwing exception
Message “Cannot access a closed Stream.”
if the PdfOptions is PdfFormat is PdfFormats.PdfA_2A

8 posts were merged into an existing topic: PDF to PDF/2A conversion using .NET

The issues you have found earlier (filed as CONVERSIONNET-6303) have been fixed in this update. This message was posted using Bugs notification tool by nikola.yankov