Process: PDF to Question, Options, Solution Images & Validation CSV

OTS standard procedure for GATE paper processing, image validation and question-level answer validation configuration.

1. Complete Process Flow

PDF → pdfToImages API → allOptions API → Linux Images → WinSCP Download → Image Validation → Manual Crop if Required → Upload Corrected Images → Prepare CSV → Configure Validation Type → Final QA

2. Process the Source PDF

  1. Select the required GATE PDF.
  2. Confirm that it opens correctly and contains the complete paper.
  3. Use the same PDF for both APIs unless the project specifies otherwise.
D:\FortressProjects\Gate_Paper\MECH_GATE_MOCK TEST -3_20-08-2025.pdf

3. Run PDF-to-Images REST API

POST https://apigateway.fortresscareer.com/orchestrator/api/v1/pdf/images/pdfToImages

KeyTypeValue
fileFileSource GATE PDF
outputDirectoryText/home/srinath/opt/apps/testimages/GATE/ME/Mock3
linuxEnvTexttrue
curl --location 'https://apigateway.fortresscareer.com/orchestrator/api/v1/pdf/images/pdfToImages' \
--header 'Authorization: Bearer <VALID_BEARER_TOKEN>' \
--form 'file=@"/D:/FortressProjects/Gate_Paper/MECH_GATE_MOCK TEST -3_20-08-2025.pdf"' \
--form 'outputDirectory="/home/srinath/opt/apps/testimages/GATE/ME/Mock3"' \
--form 'linuxEnv="true"'

4. Run All-Options REST API

POST https://apigateway.fortresscareer.com/orchestrator/api/v1/pdf/images/allOptions

KeyTypeValue
fileFileSame source GATE PDF
outputDirectoryText/home/srinath/opt/apps/testimages/GATE/ME/Mock3
linuxEnvTexttrue
curl --location 'https://apigateway.fortresscareer.com/orchestrator/api/v1/pdf/images/allOptions' \
--header 'Authorization: Bearer <VALID_BEARER_TOKEN>' \
--form 'file=@"/D:/FortressProjects/Gate_Paper/MECH_GATE_MOCK TEST -3_20-08-2025.pdf"' \
--form 'outputDirectory="/home/srinath/opt/apps/testimages/GATE/ME/Mock3"' \
--form 'linuxEnv="true"'
Security: Never publish the actual Bearer token in documentation or source control. Use a valid token from the authorized Postman environment.

5. Download and Validate Images

  1. Connect to the Linux server.
  2. Open /home/srinath/opt/apps/testimages/GATE/ME/Mock3.
  3. Confirm generated question/option/solution images exist as expected.
  4. Use WinSCP to download them to Windows.
  5. Compare every image with the original PDF.
CheckValidation
QuestionComplete text, diagrams, tables and equations are visible.
OptionsAll required options are present, readable and correctly mapped.
SolutionComplete solution is visible and mapped to the correct question, where applicable.
QualityNo clipping, distortion, unwanted content or excessive blank area.
Incorrect image: manually crop/fix it on Windows, retain the exact filename, then upload/overwrite it in the same Linux image directory.

6. Next Step After PDF/Image Processing – Prepare the CSV

After the image processing and cross-validation are completed, prepare the question-level CSV using the PDF, approved answer key and solution information.

Required CSV columns

FieldPurpose
QuestionNoQuestion number from the paper.
CorrectAnswerApproved correct answer.
SolutionLinkApproved solution URL.
DifficultyLevelEasy / Medium / Hard or project-supported value.
questionTypeMCQ or applicable project question type.
validation_typeAnswer validation method.
decimal_placesDecimal precision when applicable.
range_typeRange boundary configuration when RANGE is used.
range_minMinimum value for RANGE validation.
range_maxMaximum value for RANGE validation.
toleranceAllowed numeric difference for TOLERANCE validation.

CSV Header

QuestionNo,CorrectAnswer,SolutionLink,DifficultyLevel,questionType,validation_type,decimal_places,range_type,range_min,range_max,tolerance

7. Validation Types

RANGEDECIMAL_PLACESEXACTTOLERANCE

TypeUseFields
EXACTAnswer must exactly match the expected answer. Suitable for MCQ A/B/C/D.CorrectAnswer
DECIMAL_PLACESNumeric answer is validated using configured decimal precision.decimal_places
RANGENumeric answer is accepted inside a configured interval.range_type, range_min, range_max
TOLERANCESmall numerical difference from the expected answer is allowed.CorrectAnswer, tolerance

8. RANGE Validation Rule

For the specified OTS rule:

submittedAnswer > rangeMin AND submittedAnswer < rangeMax

Example: range_min=10 and range_max=20 accepts values strictly between 10 and 20. Therefore 10 and 20 are not accepted under this exclusive rule.

range_type: Use the project's actual supported value for this behavior. If the implementation names this behavior EXCLUSIVE, configure range_type=EXCLUSIVE.

9. DECIMAL_PLACES Validation

Use this when the question requires a numeric answer to be handled at a specified decimal precision. Example: decimal_places=2.

The actual rounding/truncation/comparison behavior must follow the application's backend implementation. The CSV should not introduce a different rounding rule.

10. TOLERANCE – What It Means and Where It Is Used

Tolerance is used for numerical answers where a small difference from the expected answer should still be considered correct. It is useful for rounding, floating-point calculations, engineering/scientific calculations and approximate numerical answers.

Conceptually, if the correct answer is C and tolerance is T:

lower limit = C - T
upper limit = C + T

Example: CorrectAnswer = 10.00 and tolerance = 0.50 gives a conceptual acceptable interval of 9.50 to 10.50. Whether 9.50 and 10.50 themselves are accepted depends on the backend comparison rule.

Do not use TOLERANCE for ordinary MCQ answers. For A/B/C/D answers, use EXACT unless the application specification says otherwise.

11. Which Fields to Populate?

Question ScenarioConfiguration
MCQ answer DCorrectAnswer=D, validation_type=EXACT
Numeric answer with decimal precisionvalidation_type=DECIMAL_PLACES, decimal_places=<value>
Numeric answer accepted within limitsvalidation_type=RANGE, range_type=<configured value>, range_min=<min>, range_max=<max>
Numeric answer allowing small deviationvalidation_type=TOLERANCE, CorrectAnswer=<value>, tolerance=<value>
Field discipline: Leave validation fields that are not relevant to the selected validation type blank, unless the application CSV specification requires defaults.

12. Sample CSV

QuestionNo,CorrectAnswer,SolutionLink,DifficultyLevel,questionType,validation_type,decimal_places,range_type,range_min,range_max,tolerance
1,D,<solution-link>,Easy,MCQ,EXACT,,,,,
2,C,<solution-link>,Easy,MCQ,EXACT,,,,,
3,D,<solution-link>,Easy,MCQ,EXACT,,,,,
4,D,<solution-link>,Medium,MCQ,EXACT,,,,,
5,C,<solution-link>,Easy,MCQ,EXACT,,,,,
6,B,<solution-link>,Medium,MCQ,EXACT,,,,,
7,C,<solution-link>,Easy,MCQ,EXACT,,,,,
8,D,<solution-link>,Easy,MCQ,EXACT,,,,,
9,D,<solution-link>,Hard,MCQ,EXACT,,,,,
10,A,<solution-link>,Easy,MCQ,EXACT,,,,,
11,C,<solution-link>,Easy,MCQ,EXACT,,,,,
12,C,<solution-link>,Medium,MCQ,EXACT,,,,,
13,C,<solution-link>,Easy,MCQ,EXACT,,,,,
14,B,<solution-link>,Medium,MCQ,EXACT,,,,,
15,D,<solution-link>,Easy,MCQ,EXACT,,,,,
16,C,<solution-link>,Easy,MCQ,EXACT,,,,,

Note: The sample answer/difficulty rows above are based on the data visible in the supplied screenshot. For the actual paper, verify each value against the PDF and approved answer key.

13. Final CSV QA Checklist

14. Final OTS Completion Flow

PDF → REST APIs → Linux Images → WinSCP → Image Cross-Verification → Manual Crop/Correction → Upload → Prepare CSV → Configure validation_type → Validate CSV → Final QA