Horinzontal space between bubble

hi,
AnswerSheetConfig have VerticalMargin property par not Horizontal.
How can I set space between Bubble in horizontaly.

Regards,

@lcsoft

Could you please share your sample OMR template and images for our reference along with an expected output image so that we can test the scenario in our environment and address it accordingly.

ModelToReproduce.PNG (252.3 KB)
Here is the model that I am trying to reproduce. my difficulties are described in the attached image.
It is : 1.how can I draw the horizontally spaced checkboxes. I need more space between the checkbox
2. how to hide values ​​inside checkbox like shown
3.how can I draw the answers in a grid as shown. and also space out the checkbox
4.is it possible to make a double numbering

Here is the model I simulated and the source code
Model_mk.png (262.7 KB)

Source Codes :
private void Main()
{
OmrEngine omrEngine = new OmrEngine();
string workingDirectory = System.IO.Directory.GetCurrentDirectory();
string outputPath = @“C:\Files\OMR”;
Aspose.OMR.Generation.GlobalPageSettings globalPageSettings = new Aspose.OMR.Generation.GlobalPageSettings();
globalPageSettings.PaperSize = Aspose.OMR.Generation.PaperSize.A3;
globalPageSettings.Orientation = Aspose.OMR.Generation.Orientation.Horizontal;

        TemplateConfig templateConfig = new TemplateConfig()
        {
            Children = new List<BaseConfig>() {
            new PageConfig() {
                Children = new List<BaseConfig>() {
                new ContainerConfig() {
                    Name = "Three-column layout",
                    ColumnsCount =3,
                    Children= new List<BaseConfig>() {
             //col 1 *************************************
                    new BlockConfig() {
                        Column = 1,
                        Name ="Bloc 1-Left", 
                        BorderType = BorderType.Square,
                        BorderColor=Aspose.OMR.Generation.Color.Red,
                         Height =1000,
                        Children = new List<BaseConfig>() {
                            new ContentConfig() {
                                Name = "part 1"
                            }
                        }
                    },
                    new BlockConfig() {
                        Column = 1,
                        Name ="Bloc 2-Left",
                        BorderType = BorderType.Square,
                        BorderColor=Aspose.OMR.Generation.Color.RoyalBlue,
                         Height =800,
                        Children = new List<BaseConfig>() {
                            new ContentConfig() {
                                        Name = "part 2"
                            }
                        }
                    },
                    new BlockConfig() {
                        Column = 1,
                        Name ="bloc 3-Left",
                        BorderType = BorderType.Square,
                        BorderColor=Aspose.OMR.Generation.Color.SeaGreen,
                        Height =820,
                        
                        Children = new List<BaseConfig>() {
                            new AnswerSheetConfig() {
                                Column =1,
                                Name = "Matriule",
                                ElementsCount = 9,
                                ColumnsCount = 1,
                                AnswersCount = 14,
                                BubbleSize = BubbleSize.Small,
                                BubbleType= BubbleType.Square,
                                VerticalMargin = 10,
                               AnswersValues = new string[] { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "o","p" }
                             },
                        }
                    },
                    new BlockConfig() {
                        Column = 1,
                        Name ="Bloc 4-Left - qrcod",
                        BorderType = BorderType.Square,
                        BorderColor=Aspose.OMR.Generation.Color.Red,
                         Height =200,
                        Children = new List<BaseConfig>() {
                            new ContentConfig() {
                                        Name = "part 2"
                            },
                            //new BarcodeConfig() {
                            //    Value = "Encoded string"
                            //}
                        }
                    },
                    

                    //**Col 2 ********************************************
                    new BlockConfig() {
                            Column = 2,
                            BorderType = BorderType.Square ,
                            //BorderColor=Aspose.OMR.Generation.Color.Red,
                             //Height =300,
                            Children = new List<BaseConfig>() {
                                    new ContentConfig() {
                                        Name = "part 2"
                                    }
                                }
                     },
                    //**Col 3 ********************************************
                    new BlockConfig() {
                            Column = 3,
                            BorderType = BorderType.Square ,
                            BorderColor=Aspose.OMR.Generation.Color.Red,
                             Height =500,
                            Children = new List<BaseConfig>() {
                                    new ContentConfig() {
                                        Name = "part 2"
                                    }
                                }
                     },
                    new BlockConfig() {
                            Column = 3,
                            BorderType = BorderType.Square ,
                             BorderColor=Aspose.OMR.Generation.Color.Blue,
                            //Height =2700,
                             Children = new List<BaseConfig>() {
                                    new ContainerConfig() {
                                    Name = "Two-column layout",
                                    ColumnsCount =2,
                                    Children= new List<BaseConfig>() {


                                        new AnswerSheetConfig() {
                                         StartId=1,
                                        // Type =GridConfig
                                         Column =2,
                                        Name = "Grille",
                                        ElementsCount = 30,
                                        ColumnsCount = 1,
                                        AnswersCount = 6, 
                                        BubbleSize = BubbleSize.Small,
                                        BubbleType= BubbleType.Square,
                                        VerticalMargin = 10,
                                        //HorizotalMargin=10,
                                        AnswersValues = new string[] { "A", "B", "C", "D", "E", "F" }
                                    },
                                    }

                                    }
                                }
                     }

                    }
                }
            }
           }

 }
        };

        //
        Aspose.OMR.Generation.GenerationResult generationResult = omrEngine.GenerateTemplate(templateConfig, globalPageSettings);
        generationResult.Save(outputPath, "Model_mk");
        MessageBox.Show("done!");
    }

@lcsoft

Can you please try using the option of different bubble sizes and let us know if that helps:

the size of bubble doesn’t change any thing. did you this templateModelToReproduce.PNG (252.3 KB)
? please I want to reproduce it.
Regards,

@lcsoft

We have logged an investigation ticket to check this case as below. We will look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.

Issue ID(s): OMRNET-908

@lcsoft

In attachment, there is an example of described layout using CustomAnswerSheet element:
Documentation - custom_answer_sheet|Documentation
*.cs - Template layout in code.
*.txt - Template layout in txt format. Text markup|Documentation
*.json - Aspose.OMR.Generation.GlobalPageSettings
*.png - Generated template.

I would like you to consider using CustomAnswerSheet element in your layout:

  1. There is no direct property for Horizontal margin, but element width and horizontal margin is based on parent width.
  2. There is no direct property for Vertical margin, but height of the cell is calculated based on GlobalPageSetting.FontSize property.
  3. There is a feature for double numbering.

Regarding empty marks - there is an option to draw empty mark - “answers_list=( )”, but recognition result will return empty space as well instead of a correct value.
To resolve it, I have added a placeholder “omr_list=(3)”. The name of the property may change, but once implemented, this feature will provide a “hidden” value to the empty mark, which will be used in the recognition result.
If you want, it will be added in the next release - 23.9 of Aspose.OMR for .NET.

To prioritize ahead of existing queue more robust changes, new elements or new logic, we are also offering an option for Paid Consulting - https://consulting.aspose.com/.

customAnswerSheet.zip (17.8 KB)

Thanks a lot. come back to after …

While waiting for the new version, your example has allowed me to progress enormously and I thank you for it. but I have another question: is it possible to start the numbering with zero? the variable %index% starts with 1. my array must start with 0.

FYI : by setting BubbleArrayConfig.FontSize = 1 I can hidden de answer value.

Regards,

@lcsoft

We are checking it and will get back to you shortly.

Yes, we can add “start_id” property to CustomAnswerSheet for zero-based numeration. It will be included in 23.9 also. The task OMRNET-910 has been logged for the purpose so that you can be notified once its resolved.

@lcsoft

23.9 version has been released. It has all features asked here. Aspose.OMR for .NET 23.9.0 - Release Notes

Thanks.

Let me test and comeback to you if necessary.

Regards,