Converter image to PDF not resize to pagesize

Hi, I am implementing the image to PDF conversion, I set the pageSize property to A4 but the pdf document is created at the image size, the conversion is not taking the pdf options.

Converter converter = new Converter(postedData.getGuid());
        PdfConvertOptions convertOptions = new PdfConvertOptions();

        convertOptions.setPageSize(PageSize.A4);
        convertOptions.setMarginTop(30);
        convertOptions.setMarginRight(30);
        convertOptions.setMarginBottom(30);
        convertOptions.setMarginLeft(30);
        converter.convert(postedData.getDestinationPath(), convertOptions);



I attach the source and result files. Thanks in advance!
f6a12345-9d0b-4a2c-9b3e-8e1234567891.zip (29.2 KB)

Hello @sara.campos.medtrainer ,

In order to help you with your query, we would require some additional details. Could you confirm if you are using the latest version of GroupDocs.Conversion for Java (24.12.1)? Also, what result do you expect from this conversion? Should it simply adjust the orientation to A4 format, or crop a specific part of the image with defined margins and place it into A4 format?

Hi, for the first test I used GroupDocs.Conversion for Java (24.3) and I set the orientation to PORTRAIT

convertOptions.setPageOrientation(PageOrientation.PORTRAIT);

I just test with (24.12.1) with different result but not the expected, I share the results and the expected file, Thank you!
conversionResults.zip (196.1 KB)

@sara.campos.medtrainer ,

We appreciate your explanation, as it will assist us in resolving the issue faster. A ticket with the ID CONVERSIONJAVA-2690 has been created in our bug tracking system, and we will make every effort to address it promptly. Rest assured, you will be informed once the fix is included in a release.