Do not print DropDown borders

I have a docx template containing FORMDROPDOWN fields. I am saving it to PDF using the following code:

@Override
    public byte[] writeFile(Document document, String fileExtension) throws IOException {

        document.getFieldOptions().setFieldUpdateCultureSource(FieldUpdateCultureSource.FIELD_CODE);
        try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
            SaveOptions saveOptions = SaveOptions.createSaveOptions(SaveFormat.fromName(fileExtension.toUpperCase()));
            if(saveOptions instanceof PdfSaveOptions pdfSaveOptions){
                pdfSaveOptions.setPreserveFormFields(true);
                pdfSaveOptions.setUpdateFields(true);
            }
            document.save(outputStream, saveOptions);
            return outputStream.toByteArray();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

When printing the PDF, I see borders around the dropdown choices.

With Acrobat professional I can control how dropdown borders are handled using this setting:

Can I control this also via the Aspose API?

The template I am using:

dropdown-test.docx (36.0 KB)

The result I am getting:

dropdown-test-out.pdf (49.5 KB)

When you open the print preview, you can already see, that the dropdown will be rendered with a border.

@kerner Could you please attach your input, output and expected output documents here for our reference? We will check the issue and provide you more information.

I updated the question.

@kerner Thank you for additional information. Unfortunately, currently there is no such API.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-27544

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like

The issues you have found earlier (filed as WORDSNET-27544) have been fixed in this Aspose.Words for .NET 24.11 update also available on NuGet.