While using the function below with standard rasterization options, the results for the attached dwg (an example, not the only one it occurs) the result come out very different from the expected (also attached):
I have worked with file shared by you and have been able to observe issue. A ticket with ID CADNET-953 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with issue so that you may be automatically notified once issue will be fixed.
I have verified the issue status from our issue tracking system and like to share that the issue is still unresolved. We request for your patience till the time the issue gets resolved. We will share notification with you as soon as the issue will be fixed.
We have investigated the requirements on our end. Actually, the image size of the attached sample is too small. In order to have a correct rendering result, one of the rasterization options should be specified:
1: specify “large” unittype (centimeter, meter, etc)
For example,
using (CadImage cadImage = (CadImage)Image.Load(fileName))
{
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();
rasterizationOptions.BackgroundColor = Color.White;
rasterizationOptions.UnitType = UnitType.Centimenter;
PdfOptions pdfOptions = new PdfOptions { VectorRasterizationOptions = rasterizationOptions };
cadImage.Save(outPath, pdfOptions);
}
2: manually specify rasterization page size
For example: