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

Free Support Forum - aspose.com

DWG file to PDF conversion

I am using the latest Aspose.CAD v20.11.0 library to convert a dwg file to pdf. For the most part, all conversions are completed without any problems, but some of the converted files are missing content.

A sample input file is attached and the code included shows the rasterization options used for conversion:

using var image = Aspose.CAD.Image.Load(sourceStream);

var rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions();

if (image.Height >= image.Width)
{
//Portrait
rasterizationOptions.PageWidth = Aspose.Pdf.PageSize.PageLetter.Width;
rasterizationOptions.PageHeight = Aspose.Pdf.PageSize.PageLetter.Height;
}
else
{
//Landscape
rasterizationOptions.PageWidth = Aspose.Pdf.PageSize.PageLetter.Height;
rasterizationOptions.PageHeight = Aspose.Pdf.PageSize.PageLetter.Width;
}

rasterizationOptions.AutomaticLayoutsScaling = true;
rasterizationOptions.NoScaling = false;
var pointsPerInch = 72;
var margin = pointsPerInch / 2;
rasterizationOptions.Margins = new Aspose.CAD.ImageOptions.Margins() { Top = margin, Bottom = margin, Left = margin, Right = margin };

var pdfOptions = new Aspose.CAD.ImageOptions.PdfOptions();

pdfOptions.VectorRasterizationOptions = rasterizationOptions;

image.Save(pdfFilePath, pdfOptions);

The result file is missing some content and I am unsure why. I have tried updating the RasterizationQuality and GraphicsOptions, but nothing produces the missing content. Also, this happens on a majority of the dwg file inputs.input_file.zip (41.9 KB)

@IRISNDT

I have created an issue with ID CADNET-1307 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed

The issues you have found earlier (filed as CADNET-1307) have been fixed in this update.

The new version is working except that now some of the labels are upside-down and showing extra text (ex. Should be “039”, but instead shows “039 COMP LSIZE SPEC” upside-down)

See attached drawing
075-0120-03 (1) (1).zip (78.9 KB)

@IRISNDT

Can you please share the generated output and also the snapshot highlighting the issue related to labels.

Generated output is attached
075-0120-03 (1) (1).zip (78.9 KB)
DWG shows:
DWG Display.png (12.5 KB)
While PDF Shows:
PDF Display.png (16.5 KB)

@IRISNDT

I have added the feedback in our issue tracking system and will get back to you as soon as further information will be shared by the team.

Do you have a status update?

@IRISNDT

I regret to share that the concerned issue is still unresolved and in fact a new ticket has been added with ID CADNET-8105 to investigate and resolve that. We will share updates with you as soon as they will be shared.

Could I get a status update?

@IRISNDT

Can you please try latest Aspose.CAD for .NET 21.7 on your and share the feedback with us if there is still an issue.