{index-content-net.header_title}
{index-content-net.code_title}
{index-content-common.code_more} >// Initialize Aspose.OMR engine
var omrEngine = new Aspose.OMR.Api.OmrEngine();
// Generate machine-readable form from the markup
var generationResult
= omrEngine.GenerateTemplate("template.txt");
// Save printable OMR form to the PDF document
generationResult.SaveAsPdf("print", "answer-sheet");
> dotnet add package Aspose.OMR
{index-content-net.overview_title}
{index-content-net.overview_description}
{index-content-net.overview_features.feature1_title}
{index-content-net.overview_features.feature1_content}
{index-content-net.overview_features.feature2_title}
{index-content-net.overview_features.feature2_content}
{index-content-net.overview_features.feature3_title}
{index-content-net.overview_features.feature3_content}
{index-content-net.overview_features.feature4_title}
{index-content-net.overview_features.feature4_content}
{index-content-net.overview_features.feature5_title}
{index-content-net.overview_features.feature5_content}
{index-content-common.livesample.title}
{index-content-net.livesample.description}
{index-content-common.livesample.subtitle}
{index-content-net.livesample.more} >public bool GenerateAnswerSheet(string markupFilePath)
{
// Initialize Aspose.OMR engine
var omrEngine = new Aspose.OMR.Api.OmrEngine();
// Set paper size
var pageSettings = new Aspose.OMR.Generation.GlobalPageSettings();
pageSettings.PaperSize = Aspose.OMR.Generation.PaperSize.A4;
// Generate machine-readable form from the markup file
var omrForm = omrEngine.GenerateTemplate(markupFilePath, pageSettings);
// Error handling
if(omrForm.ErrorCode != 0) return false;
// Save printable OMR form to the PDF document
omrForm.SaveAsPdf("print", "answer-sheet");
return true;
}
{index-content-net.platforms_title}
{index-content-net.platforms_description}
{index-content-common.formats.title}
Aspose.OMR for .NET {index-content-common.formats.description_part_1}( https://docs.aspose.com/omr/net/supported-file-formats/ ) {index-content-common.formats.description_part_2}
{index-content-common.formats.group1}
- Plain text
- JSON
- Programmatically
{index-content-common.formats.group2}
- Scans: JPEG, PNG, TIFF, GIF, BMP
- Photos: JPEG, PNG
{index-content-common.formats.group3}
- CSV
- JSON
- XML
{index-content-net.all_texts.text1.title}
{index-content-net.all_texts.text1.paragraph1}
{index-content-net.all_texts.text1.paragraph2}
- {index-content-net.all_texts.text1.b_li_1}
- {index-content-net.all_texts.text1.b_li_2}
- {index-content-net.all_texts.text1.b_li_3}
- {index-content-net.all_texts.text1.b_li_4}
- {index-content-net.all_texts.text1.b_li_5}
{index-content-net.all_texts.text2.title}
{index-content-net.all_texts.text2.paragraph1}
- {index-content-net.all_texts.text2.b_li_1}
- {index-content-net.all_texts.text2.b_li_2}
- {index-content-net.all_texts.text2.b_li_3}
- {index-content-net.all_texts.text2.b_li_4}
- {index-content-net.all_texts.text2.b_li_5}
- {index-content-net.all_texts.text2.b_li_6}
- {index-content-net.all_texts.text2.b_li_7}
{index-content-common.features.title}
Aspose.OMR for .NET {index-content-common.features.description}
{index-content-common.features.feature1_title}
{index-content-common.features.feature1_content}
{index-content-common.features.feature2_title}
{index-content-common.features.feature2_content}
{index-content-common.features.feature3_title}
{index-content-common.features.feature3_content}
{index-content-common.features.feature4_title}
{index-content-common.features.feature4_content}
{index-content-common.features.feature5_title}
{index-content-common.features.feature5_content}
{index-content-common.features.feature6_title}
{index-content-common.features.feature6_content}
{index-content-common.features.feature7_title}
{index-content-common.features.feature7_content}
{index-content-common.features.feature8_title}
{index-content-common.features.feature8_content}
{index-content-common.features.feature9_title}
{index-content-common.features.feature9_content}
{index-content-net.code_samples.title}
{index-content-net.code_samples.description}
{index-content-net.code_samples.item1.title}
{index-content-net.code_samples.item2.title}
{index-content-net.code_samples.item2.content1}
How to design an answer sheet
?answer_sheet=answers
elements_count=150
answers_count=5
columns_count=3
{index-content-net.code_samples.item2.content2}
How to generate a printable form
// Initialize Aspose.OMR engine
var omrEngine = new Aspose.OMR.Api.OmrEngine();
// Generate machine-readable form from the markup
var generationResult = omrEngine.GenerateTemplate("template.txt");
// Save printable OMR form to the PDF document
generationResult.SaveAsPdf("print", "answer-sheet");
{index-content-net.code_samples.item3.title}
{index-content-net.code_samples.item3.content1}
How to recognize a completed form
// Initialize Aspose.OMR engine
Aspose.OMR.Api.OmrEngine omrEngine = new Aspose.OMR.Api.OmrEngine();
// Apply the recognition template
Aspose.OMR.Api.TemplateProcessor templateProcessor = omrEngine.GetTemplateProcessor("Hello.OMR.omr");
// Load the scanned or photographed form
Aspose.OMR.Model.RecognitionResult recognitionResult = templateProcessor.RecognizeImage("IMG_20220401.jpg");
// Output the recognition result
string result = recognitionResult.GetCsv();
Console.WriteLine(result);