Hi,
As discussed privately with the Doconut team, we detected a possible inconsistency regarding the separation of Doconut into the plugin structure, separating the converter from the main package, in which the process of converting DWG to PDF, the previous CadConfig configuration options are no longer available for usage.
The previous package, with built-in converter, Doconut.NET6 version 26.6.0, had the mentioned capabilities, but the problem was replicated with the following plugin combinations:
Doconut.NET6+Doconut.NET6.Converterversion26.7.0Doconut.NET6+Doconut.NET6.Converterversion26.8.0Doconut.NET6+Doconut.NET6.Converterversion26.9.0Doconut.NET8+Doconut.NET8.Converterversion26.7.0Doconut.NET8+Doconut.NET8.Converterversion26.8.0Doconut.NET8+Doconut.NET8.Converterversion26.9.0
In this context, on version 26.7.x and superior, when the Doconut.NETx.Converter was introduced, the ExportToPdf method is not longer publicly accessible anymore and, in the new methods available in the plugin package, we did not manage to find any configuration argument, like the mentioned CadConfig, in which would be possible to set the criteria for the PDF plot process using a DWG file as base, including layer configuration (model vs layout), color control (monochrome vs color), default render, etc.
Previous plugins example:
var config = new CadConfig
{
DefaultRender = request.DefaultRender,
ShowColor = request.ShowColor,
WhiteBackground = request.WhiteBackground,
ShowModel = request.ShowModel,
ShowLayouts = request.ShowLayouts,
LineWidth = 1,
Check3DSolid = false,
LimitMaximumSize = true,
QualityImage = CadConfig.Quality.High,
QualityText = CadConfig.Quality.High,
ShowAllLayoutsDgn = true,
};
var docViewer = new Viewer(_cache, _accessor, licenseFilePath);
var token = docViewer.OpenDocument(dwgPath, config, documentOptions);
docViewer.ExportToPdf(pdfPath);
The new plugins, as mentioned, no longer expose the ExportToPdf method and present a new ConvertAsync, in which contemplates the following scenarios, without configuration options:
public Task<Stream> ConvertAsync(string filePath, ConversionTarget target, string? password = null, CancellationToken ct = default);
public Task<Stream> ConvertAsync(Stream source, string sourceExtension, ConversionTarget target, string? password = null, CancellationToken ct = default);
In the therefore mentioned talk with the Doconut team, we’re asked to open this discussion on the forum for proper verification from the support team with the communication that, if this problem is verified, this is probably due to a migration error to the plugin structure and would be addressed in a future update.
Best regards,
Profits Consulting