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

Free Support Forum - aspose.com

DWG to PDF char encode on export

So, I’m trying to export a DWG to PDF and all looks good. Though, some special characters are not rendered accordly. Is there a way to set the char encoding on the result PDF output?

Here my code:

private ResponseEntity<byte[]> dwgToPdf(byte[] bytes) {

    val stream = new MemoryStream(bytes);

    val image = Image.load(stream.toInputStream());

    CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();

    // Create an instance of PdfOptions
    PdfOptions pdfOptions = new PdfOptions();
    // Set the VectorRasterizationOptions property

    // Export the DWG to PDF

    val os = new ByteArrayOutputStream();

    image.save(os, pdfOptions);

    return ResponseEntity.ok(os.toByteArray());



I have observed your comments. Can you please share source file along with environment details and also please share which Aspose.CAD version you are using on your end so that we may further investigate to help you out.