Dwg to PDF problem

I use Aspose.pdf For Java on trial, when I convert dwg to pdf, the image is cut off.Could you tell me why? attachment.zip (1012.8 KB)

@www.evget.com

Thanks for contacting support.

Would you please share the code snippet and API version which you are using. So that we can test the scenario in our environment and address it accordingly.

@www.evget.com,

I have observed the DWG and PDF file shared by you and request you to please first try using latest Aspose.CAD 17.9 on your end. If there is still an issue then please share the working sample code with us reproducing the issue on your end.

dwg.zip (269.7 KB)
I use Aspose.CAD 17.9 , and convert the attachment file (dwg) to jpeg, but the converted file is still cut off,Could you convert my dwg file to jpeg, and help me solve this problem? thank you very much!

@www.evget.com,

I suggest you to please try using following sample code on your end.

public static void ExportCadToPDF()
{

    String dataDir = @"C:\CAD\";
    String srcFile = dataDir + "test.dwg";

    // Load a CAD drawing in an instance of CadImage
    CadImage image = (CadImage)Image.Load(srcFile);

    // Create an instance of CadRasterizationOptions
    CadRasterizationOptions rasterizationOptions = null;

    rasterizationOptions = new CadRasterizationOptions();
    rasterizationOptions.CenterDrawing = true;

    rasterizationOptions.AutomaticLayoutsScaling = true;

    // Set VectorRasterizationOptions property to the instance of CadRasterizationOptions
    PdfOptions opts = new PdfOptions();

    opts.VectorRasterizationOptions = rasterizationOptions;

    image.Save(dataDir + "test.pdf", opts);

}

test.pdf (96.9 KB)