Hello,
We recently upgraded our C# conversion project to .Net 6 and upgraded GroupDocs.Conversion to 22.5 at the same time. We are noticing that images get dropped from the output when converting docx to pdf. This appears to have been a problem for a while now, though our previous version, 20.8, worked fine (unfortunately, we cannot go back to that version due to the fact that it doesn’t support .Net 6)
The converter is running on Windows. Here’s our conversion code:
public override async Task<Stream> ConvertToThumbnailAsync(Stream source, int width, int height)
{
Stream thumbnailStream = null;
var options2 = new PdfConvertOptions
{
Format = PdfFileType.Pdf,
PageNumber = 1,
PagesCount = 1
};
source = await ConvertToType(source, options2);
using (Converter converter = new Converter(() => source))
{
thumbnailStream = new MemoryStream();
var options = new ImageConvertOptions
{
Format = ImageFileType.Png,
PageNumber = 1,
PagesCount = 1,
Height = height
};
converter.Convert(() => new MemoryStream(), (convertedStream, x) =>
{
convertedStream.CopyTo(thumbnailStream);
}, options);
}
return await Task.FromResult(thumbnailStream);
}
protected async Task<Stream> ConvertToType(Stream source, ConvertOptions options)
{
Stream stream = null;
using (Converter converter = new Converter(() => source))
{
stream = new MemoryStream();
converter.Convert(() => new MemoryStream(), (convertedStream, x) =>
{
convertedStream.CopyTo(stream);
}, options);
}
return await Task.FromResult(stream);
}
What other information can I provide?