Make a easy paper of general medicine on the same format given in the above image
ls /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/gm-p…
~/gm-paper/create_paper.js
const { Document, Packer, Paragraph, TextRun, AlignmentType, TabStopType, TabStopPosition } = require('docx');
const fs = require('fs');
function bold(text, size) {
return new TextRun({ text, bold: true, size: size || 22, font: "Times New Roman" });
}
function normal(text, size) {
return new TextRun({ text, size: size || 22, font: "Times New Roman" });
}
function italicBold(text, size) {
return new TextRun({ text, bold: true, italics: true, size: size || 22, font: "Times New Roman" });
}
const doc = new Document({
styles: {
default: {
document: { run: { font: "Times New Roman", size: 22 } }
}
},
sections: [{
properties: {
page: {
margin: { top: 720, bottom: 720, left: 1080, right: 1080 }
}
},
children: [
// Top right GM label
new Paragraph({
alignment: AlignmentType.RIGHT,
children: [bold("GM", 20)]
}),
// Header - BDS line
new Paragraph({
alignment: AlignmentType.CENTER,
children: [bold("B.D.S. Third Year (Remanded) Examination, February-2026", 22)]
}),
// Subject
new Paragraph({
alignment: AlignmentType.CENTER,
children: [bold("GENERAL MEDICINE", 24)]
}),
// Paper
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { after: 200 },
children: [bold("Paper - I", 22)]
}),
// Time and Marks line
new Paragraph({
tabStops: [{ type: TabStopType.RIGHT, position: 9026 }],
children: [
bold("Time: 3Hours"),
new TextRun({ text: "\t", font: "Times New Roman" }),
bold("Maximum Marks: 70")
]
}),
// Instructions line 1
new Paragraph({
alignment: AlignmentType.CENTER,
children: [bold("Attempt three questions from each section A & B, Question No. 4 & 8 is compulsory", 20)]
}),
// Instructions line 2
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { after: 120 },
children: [bold("(Use Separate answer books for each section)", 20)]
}),
// Section A heading with marks
new Paragraph({
tabStops: [{ type: TabStopType.RIGHT, position: 9026 }],
spacing: { before: 100, after: 100 },
children: [
bold("Section- A"),
new TextRun({ text: "\t", font: "Times New Roman" }),
bold("Marks- 35")
]
}),
// Q.1
new Paragraph({
tabStops: [{ type: TabStopType.RIGHT, position: 9026 }],
spacing: { before: 140, after: 60 },
children: [
bold("Q.1 "),
normal("What is Diabetes Mellitus? Enumerate the complications of Diabetes Mellitus."),
new TextRun({ text: "\t", font: "Times New Roman" }),
normal("10")
]
}),
new Paragraph({
indent: { left: 600 },
spacing: { after: 120 },
children: [normal("How will you manage a Diabetic patient for dental treatment?")]
}),
// Q.2
new Paragraph({
tabStops: [{ type: TabStopType.RIGHT, position: 9026 }],
spacing: { before: 140, after: 60 },
children: [
bold("Q.2 "),
normal("What is Hypertension? How do you classify Hypertension?"),
new TextRun({ text: "\t", font: "Times New Roman" }),
normal("10")
]
}),
new Paragraph({
indent: { left: 600 },
spacing: { after: 120 },
children: [normal("Discuss the management of hypertensive patient undergoing dental procedure.")]
}),
// Q.3
new Paragraph({
tabStops: [{ type: TabStopType.RIGHT, position: 9026 }],
spacing: { before: 140, after: 60 },
children: [
bold("Q.3 "),
normal("Enumerate various causes of Jaundice. Discuss the clinical features and"),
new TextRun({ text: "\t", font: "Times New Roman" }),
normal("10")
]
}),
new Paragraph({
indent: { left: 600 },
spacing: { after: 120 },
children: [normal("management of Hepatitis B.")]
}),
// Q.4
new Paragraph({
tabStops: [{ type: TabStopType.RIGHT, position: 9026 }],
spacing: { before: 140, after: 60 },
children: [
bold("Q.4 "),
italicBold("Write short note on (any three)."),
new TextRun({ text: "\t", font: "Times New Roman" }),
normal("15")
]
}),
new Paragraph({ indent: { left: 600 }, children: [normal("(a) Clinical Features of Bronchial Asthma")] }),
new Paragraph({ indent: { left: 600 }, children: [normal("(b) Peptic Ulcer Disease")] }),
new Paragraph({ indent: { left: 600 }, children: [normal("(c) First Aid in Anaphylaxis")] }),
new Paragraph({ indent: { left: 600 }, spacing: { after: 160 }, children: [normal("(d) Iron Deficiency Anaemia")] }),
// Section B heading with marks
new Paragraph({
tabStops: [{ type: TabStopType.RIGHT, position: 9026 }],
spacing: { before: 120, after: 100 },
children: [
bold("Section - B"),
new TextRun({ text: "\t", font: "Times New Roman" }),
bold("Marks- 35")
]
}),
// Q.5
new Paragraph({
tabStops: [{ type: TabStopType.RIGHT, position: 9026 }],
spacing: { before: 140, after: 60 },
children: [
bold("Q.5 "),
normal("Describe the clinical features, diagnosis and management of Pulmonary Tuberculosis."),
new TextRun({ text: "\t", font: "Times New Roman" }),
normal("10")
]
}),
// Q.6
new Paragraph({
tabStops: [{ type: TabStopType.RIGHT, position: 9026 }],
spacing: { before: 140, after: 60 },
children: [
bold("Q.6 "),
normal("Describe the oral manifestations of Cardiovascular diseases."),
new TextRun({ text: "\t", font: "Times New Roman" }),
normal("10")
]
}),
// Q.7
new Paragraph({
tabStops: [{ type: TabStopType.RIGHT, position: 9026 },],
spacing: { before: 140, after: 60 },
children: [
bold("Q.7 "),
normal("Discuss the etiology and clinical features of Congestive Heart Failure. How will you"),
new TextRun({ text: "\t", font: "Times New Roman" }),
normal("10")
]
}),
new Paragraph({
indent: { left: 600 },
spacing: { after: 120 },
children: [normal("approach and treat a patient of Acute Left Ventricular Failure?")]
}),
// Q.8
new Paragraph({
tabStops: [{ type: TabStopType.RIGHT, position: 9026 }],
spacing: { before: 140, after: 60 },
children: [
bold("Q.8 "),
italicBold("Write short note on (any three)."),
new TextRun({ text: "\t", font: "Times New Roman" }),
normal("15")
]
}),
new Paragraph({ indent: { left: 600 }, children: [normal("(a) Epilepsy and its dental significance")] }),
new Paragraph({ indent: { left: 600 }, children: [normal("(b) Hypothyroidism")] }),
new Paragraph({ indent: { left: 600 }, children: [normal("(c) Clinical features of Myocardial Infarction")] }),
new Paragraph({ indent: { left: 600 }, spacing: { after: 160 }, children: [normal("(d) 4 causes of Hepatomegaly")] }),
]
}]
});
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync("/home/daytona/workspace/gm-paper/GM_Paper_Easy.docx", buffer);
console.log("Done: GM_Paper_Easy.docx");
}).catch(err => {
console.error("Error:", err);
process.exit(1);
});
cd /home/daytona/workspace/gm-paper && node create_paper.js
ls -lh /home/daytona/workspace/gm-paper/GM_Paper_Easy.docx && python3 /home/dayt…
GM Paper Easy
Word Document · DOCX