Pdf conversion issues from PDF to Dxf and DWG

  1. Pdf to Dxf conversion is not getting correct.

I have used following code snippet->

// Open PDF document
Document pdfDocument = new Document(“input.pdf”);
// Create Resolution object
Resolution resolution = new Resolution(300);
// Create TiffSettings object
TiffSettings tiffSettings = new TiffSettings
{
Compression = CompressionType.None,
Depth = ColorDepth.Default,
Shape = ShapeType.Landscape,
SkipBlankPages = false
};
// Create TIFF device
TiffDevice tiffDevice = new TiffDevice(resolution, tiffSettings);
// Convert a particular page and save the image to stream
tiffDevice.Process(“output.tif”);
// load TIFF file
var image = Image.Load(“output.tif”);
// supports Dicom, Jpeg2000, Apng, Psd, Dxf, Wmf, Emz, Wmz, Tga, Svgz file formats
// save TIFF to PSD file format
image.Save(“output.dxf”, new Aspose.Imaging.ImageOptions.TgaOptions());

Conclusion->

  1. Tiff file is being creating fine, I have checked it on tiff viewers.

  2. When trying to convert it into .dxf format, file is not getting correct.

  3. When I was trying to convert in another formats like psd and tga, working fine.

  4. Also is there any option to convert Pdf to DWG (CAD) format ?

Aspose20240424.zip (163.8 KB)

@tweakingtech, Thank you for your request, exporting raster images to dwg format is not currently supported.
Support is planned until the end of the year.
For direct PDF conversion, try please our adapter, if the PDF does not have built-in bitmaps, this should help.