<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.min.js"></script>

    <style>
        form {
            font-family: Arial, Helvetica, sans-serif;
            padding: 20px;
        }
        fieldset {
            border: 2px solid #ccc;
            padding: 10px;
            margin-bottom: 20px;
        }
        legend {
            font-size: 16px;
            font-weight: bold;
        }
        label {
            display: inline-block;
            width: 275px;
            text-align: left;
            margin-right: 10px;
            font-size: 12px;
        }
        select, input[type="text"] {
            display: inline-block;
            width: 120px;
            text-align: left;
            margin-right: 10px;
            font-size: 12px;
        }
        .button {
            margin-top: 20px;
            padding: 10px 20px;
            border-radius: 5px;
            background-color: green;
            color: white;
            font-size: 12px;
            cursor: pointer;
            transition-duration: 0.4s;
        }
        .button1 {
            background-color: white; 
            color: black; 
            border: 2px solid #04AA6D;
        }
        .button1:hover {
            background-color: #04AA6D;
            color: white;
        }
        #leftContainer {
            float: left;
            width: calc(50% - 10mm - 3cm);
            margin-left: 30mm;
        }
        #rightContainer {
            float: right;
            width: calc(50% - 10mm - 3cm);
            margin-right: 30mm;
            
        }
    </style>
<script>
function downloadPDF() {
        var doc = new jsPDF('landscape', 'mm', 'a4'); // Creating a new instance of jsPDF with A4 landscape format
        
      var rightColumnWidth = 90; // 30mm from right
        var rightColumnX = doc.internal.pageSize.getWidth() - rightColumnWidth - 30;
        var rightColumnHeight = 240; // Total height of the text in the right column
        var yPosition = 60; // Initial y position for the text

        var leftColumnWidth = 90; // 30mm from left
        var leftColumnX = 30; // Initial x position for the left column
        var leftColumnHeight = 240; // Total height of the text in the left column
        var leftYPosition = 60; // Initial y position for the text in the left column



        doc.setFont("calibri");
        doc.setFontSize(22);
        var textWidth = doc.getTextWidth("My Birthday");
        var xPosition = rightColumnX + (rightColumnWidth - textWidth) / 2;
        doc.text(xPosition, yPosition, "My Birthday"); // Centered in right column
        yPosition += 13; // Adjust for next line

        doc.setFontSize(16);
        textWidth = doc.getTextWidth("was created specially for you");
        xPosition = rightColumnX + (rightColumnWidth - textWidth) / 2;
        doc.text(xPosition, yPosition, "was created specially for you"); // Centered in right column
        yPosition += 13; // Adjust for next line

        var name = document.getElementById('name').value;
        doc.setFontSize(20);
        textWidth = doc.getTextWidth(name);
        xPosition = rightColumnX + (rightColumnWidth - textWidth) / 2;
        doc.text(xPosition, yPosition, name); // Centered in right column
        yPosition += 20; // Adjust for next line

        var specialMessage = document.getElementById('specialMessage').value;
        doc.setFontSize(16);
        textWidth = doc.getTextWidth(specialMessage);
        xPosition = rightColumnX + (rightColumnWidth - textWidth) / 2;
        doc.text(xPosition, yPosition, specialMessage); // Centered in right column
        yPosition += 13; // Adjust for next line

        var bookGift = document.getElementById('bookGift').value;
        doc.setFontSize(16);
        textWidth = doc.getTextWidth(bookGift);
        xPosition = rightColumnX + (rightColumnWidth - textWidth) / 2;
        doc.text(xPosition, yPosition, bookGift); // Centered in right column
        yPosition += 13; // Adjust for next line

        var agentText = "Independent Agent";
        textWidth = doc.getTextWidth(agentText);
        xPosition = rightColumnX + (rightColumnWidth - textWidth) / 2;
        doc.text(xPosition, yPosition, agentText); // Centered in right column
        yPosition += 12; // Adjust for next line

        var agentName = document.getElementById('agentName').value;
        doc.setFontSize(12);
        textWidth = doc.getTextWidth(agentName);
        xPosition = rightColumnX + (rightColumnWidth - textWidth) / 2;
        doc.text(xPosition, yPosition, agentName); // Centered in right column
        yPosition += 12; // Adjust for next line

        var agentContact = document.getElementById('agentContact').value;
        doc.setFontSize(8);
        var isbnText = "ISBN 978-0-7961-5769-0";
        textWidth = doc.getTextWidth(isbnText);
        xPosition = rightColumnX + (rightColumnWidth - textWidth) / 2;
        doc.text(xPosition, yPosition, isbnText); // Centered in right column

    // Add a new page
    doc.addPage();

      // Content for the first page
    var hometown = document.getElementById('hometown').value;
    var gender = document.getElementById('gender').value;
    var name = document.getElementById('name').value;

   var text = (gender === 'Male') ? "" + name + " is a little puppet made of wood. He is staying in a tiny wooden house with his family in a town called " + hometown + ".\n\n“Tomorrow is my birthday!”, said " + name + ".  “I can’t wait to open my presents”, he thought. “What will it be?”, he wondered." : "" + name + " is a little puppet made of wood.  She is staying in a tiny wooden house with her family in a town called " + hometown + ".\n\n“Tomorrow is my birthday!”, said " + name + ".  “I can’t wait to open my presents”, she thought. “What will it be?”, she wondered.";

doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (leftColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = leftColumnX + (leftColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number
var predeterminedPageNumber = 1; // Change this to the desired page number
doc.setFontSize(10);
doc.text(10, doc.internal.pageSize.getHeight() - 10, ' ' + predeterminedPageNumber);

 // Add a new page
    doc.addPage();

      // Content for the 2 page
    

	var gender = document.getElementById('gender').value;
	var figureMother = document.getElementById('figureMother').value;
	var figureMotherName = document.getElementById('figureMotherName').value;
	
var text = (gender === 'Male') ?""+name+" went to his "+figureMother+", "+figureMotherName+". She was icing something in the kitchen.  “Do people always get presents on their birthday?” asked "+name+".\n\n“No "+name+",” she said, putting down her knife full of yellow icing. “Many people do not get birthday presents”. “Some families are too poor to buy presents”.\n\nThis made "+name+" worry.  “Are we too poor for presents?” he wondered.":""+name+" went to her "+figureMother+", "+figureMotherName+". She was icing something in the kitchen.  “Do people always get presents on their birthday?” asked "+name+".\n\n“No "+name+",” she said, putting down her knife full of yellow icing. “Many people do not get birthday presents”. “Some families are too poor to buy presents”.\n\nThis made "+name+" worry.  “Are we too poor for presents?” she wondered."
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (rightColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = rightColumnX + (rightColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number for the second page
var predeterminedPageNumber = 4; // Change this to the desired page number
doc.setFontSize(10);

// Calculate x position to place page number in the right column
var xPosition = doc.internal.pageSize.getWidth() - 15; // 10 units from the right edge
var yPosition = doc.internal.pageSize.getHeight() - 15; // 10 units from the bottom edge

// Add the page number to the document
doc.text(xPosition, yPosition, ' ' + predeterminedPageNumber);

 // Add a new page
    doc.addPage();

   // Content for the 3 page
    var gender = document.getElementById('gender').value;
	var figureFather = document.getElementById('figureFather').value;
	var figureFatherName = document.getElementById('figureFatherName').value;

    var text = (gender === 'Male') ?""+name+" went to find his "+figureFather+", "+figureFatherName+".  “I wonder what will my present be”, he thought.  "+name+" found his "+figureFather+" in the bedroom, he was hiding something under the bed.  “Do birthdays always come, "+figureFather+"?”, "+name+" asked.\n"+figureFather+" "+figureFatherName+"smiled. “What do you mean?”.\n“What if my birthday just doesn’t come”.  “Birthdays always come,” he replied.\n“Oh,” said "+name+" with a smile on his face. ":""+name+" went to find her "+figureFather+", "+figureFatherName+".  “I wonder what will my present be”, she thought.  "+name+" found her "+figureFather+" in the bedroom, she was hiding something under the bed.  “Do birthdays always come, "+figureFather+"?”, "+name+" asked.\n"+figureFather+" "+figureFatherName+"smiled. “What do you mean?”.\n“What if my birthday just doesn’t come”.  “Birthdays always come,” she replied.\n“Oh,” said "+name+" with a smile on her face. ";
	
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (leftColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = leftColumnX + (leftColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number
var predeterminedPageNumber = 5; // Change this to the desired page number
doc.setFontSize(10);
doc.text(10, doc.internal.pageSize.getHeight() - 10, ' ' + predeterminedPageNumber);
// Add a new page
    doc.addPage();

      // Content for the 4 page
    var gender = document.getElementById('gender').value;
	var figureFriend = document.getElementById('figureFriend').value;
	var figureFriendName = document.getElementById('figureFriendName').value;

   var text = (gender === 'Male') ? ""+name+" went into the lounge, where his "+figureFriend+" "+figureFriendName+" was watching TV.  “I wonder how many hours until my birthday”, he thought.  "+name+" tried to watch TV, but he was too excited.\n\n“"+figureFriendName+", do you know how many  hours until my birthday?” "+figureFriendName+" turned down the volume, “I don't really know the hours but it will be soon.” "+name+" was wandering what “soon” really mean.  “Don't worry "+name+"”, said "+figureFriendName+". “You just have to wait for the sun to go down and rise again.”" :""+name+" went into the lounge, where her "+figureFriend+" "+figureFriendName+" was watching TV.  “I wonder how many hours until my birthday”, she thought.  "+name+" tried to watch TV, but she was too excited.\n\n“"+figureFriendName+", do you know how many hours until my birthday?” "+figureFriendName+" turned down the volume, “I don't really know the hours but it will be soon.” "+name+" was wandering what “soon” really mean.  “Don't worry "+name+"”, said "+figureFriendName+". “You just have to wait for the sun to go down and rise again.”";
	
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (rightColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = rightColumnX + (rightColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number for the second page
var predeterminedPageNumber = 8; // Change this to the desired page number
doc.setFontSize(10);

// Calculate x position to place page number in the right column
var xPosition = doc.internal.pageSize.getWidth() - 15; // 10 units from the right edge
var yPosition = doc.internal.pageSize.getHeight() - 15; // 10 units from the bottom edge

// Add the page number to the document
doc.text(xPosition, yPosition, ' ' + predeterminedPageNumber);
// Add a new page
    doc.addPage();

   // Content for the 5 page
    var gender = document.getElementById('gender').value;
	var figureOlderWomanName = document.getElementById('figureOlderWomanName').value;
	var text = (gender === 'Male') ? "“Why can’t I have my birthday today?”  "+name+" wondered.\n“I know who I’ll ask, "+figureOlderWomanName+"!” "+name+" thought.\n\n"+figureOlderWomanName+" was sitting outside, knitting something purple. “What are you knitting "+figureOlderWomanName+"?”.\n\n“Something warm and purple”, she grinned." : "“Why can’t I have my birthday today?”  "+name+" wondered.\n“I know who I’ll ask, "+figureOlderWomanName+"!” "+name+" thought.\n\n"+figureOlderWomanName+" was sitting outside, knitting something purple. “What are you knitting "+figureOlderWomanName+"?”.\n\n“Something warm and purple”, she grinned.";

  var text = (gender === 'Male') ? "“Why can’t I have my birthday today?”  "+name+" wondered.\n“I know who I’ll ask, "+figureOlderWomanName+"!” "+name+" thought.\n\n"+figureOlderWomanName+" was sitting outside, knitting something purple. “What are you knitting "+figureOlderWomanName+"?”.\n\n“Something warm and purple”, she grinned." : "“Why can’t I have my birthday today?”  "+name+" wondered.\n“I know who I’ll ask, "+figureOlderWomanName+"!” "+name+" thought.\n\n"+figureOlderWomanName+" was sitting outside, knitting something purple. “What are you knitting "+figureOlderWomanName+"?”.\n\n“Something warm and purple”, she grinned.";
			
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (leftColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = leftColumnX + (leftColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number
var predeterminedPageNumber = 9; // Change this to the desired page number
doc.setFontSize(10);
doc.text(10, doc.internal.pageSize.getHeight() - 10, ' ' + predeterminedPageNumber);


// Add a new page
doc.addPage();

// Content for the 6th page
var gender = document.getElementById('gender').value;
var figureOlderWomanName = document.getElementById('figureOlderWomanName').value;
var birthday = document.getElementById('birthday').value;
var text = (gender === 'Male') ? "“I had something I wanted to ask you but I've forgotten, frowned " + name + ". \n“O yes, now I remember. Is it not possible to have my birthday today, or everyday?”\n\n" + figureOlderWomanName + " thought while she knitted.\n“Each of us were only born once, and our birthday reminds us of the exact day of the year, we were born on.” \n\n“Oh”, said " + name + ".“So my birthday will always be on " + birthday + "?” \n“That's right my dear” she said." : "“I had something I wanted to ask you but I've forgotten, frowned " + name + ". \n“O yes, now I remember. Is it not possible to have my birthday today, or everyday?”\n\n" + figureOlderWomanName + " thought while she knitted.\n“Each of us were only born once, and our birthday reminds us of the exact day of the year, we were born on.” \n\n“Oh”, said " + name + ".“So my birthday will always be on " + birthday + "?” \n“That's right my dear” she said.";

doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (rightColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = rightColumnX + (rightColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number for the second page
var predeterminedPageNumber = 12; // Change this to the desired page number
doc.setFontSize(10);

// Calculate x position to place page number in the right column
var xPosition = doc.internal.pageSize.getWidth() - 15; // 10 units from the right edge
var yPosition = doc.internal.pageSize.getHeight() - 15; // 10 units from the bottom edge

// Add the page number to the document
doc.text(xPosition, yPosition, ' ' + predeterminedPageNumber);
// Add a new page
    doc.addPage();

   // Content for the 7 page
    var gender = document.getElementById('gender').value;
	var figureMother = document.getElementById('figureMother').value;
	var text = (gender === 'Male') ? "Finally, it was time for dinner. "+name+"’s family sat around the big table in the dining room. \nHe scooped up a sausage and some green peas with his fork. “Please will you wake me up early?”, he  asked his "+figureMother+".\n\n“Of course”, she replied." : "Finally, it was time for dinner. "+name+"’s family sat around the big table in the dining room. \nShe scooped up a sausage and some green peas with her fork. “Please will you wake me up early?”, she asked her "+figureMother+".\n\n“Of course”, she replied.";
		
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (leftColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = leftColumnX + (leftColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number
var predeterminedPageNumber = 13; // Change this to the desired page number
doc.setFontSize(10);
doc.text(10, doc.internal.pageSize.getHeight() - 10, ' ' + predeterminedPageNumber);

// Add a new page
    doc.addPage();

      // Content for the 8 page
   var gender = document.getElementById('gender').value;
	var pet = document.getElementById('pet').value;
	var figureFather = document.getElementById('figureFather').value;
	var text = (gender === 'Male') ? ""+name+" ate a piece of sausage. “Do animals have birthdays?” he asked curiously. \n\n"+name+"’s "+figureFather+" replied, “Animals do have birthdays if you know when they were born, like "+pet+". The problem is that we do not always know when they were born therefore do not know when to celebrate their birthdays.” \n\n“Animals also love each other, don't they?”.\n“Yes "+name+"”, he said, “they love each other the same way we do”. \n\n“Oh, good”, "+name+" was pleased." : ""+name+" ate a piece of sausage. “Do animals have birthdays?” she asked curiously. \n\n"+name+"’s "+figureFather+" replied, “Animals do have birthdays if you know when they were born, like "+pet+". The problem is that we do not always know when they were born therefore do not know when to celebrate their birthdays.” \n\n“Animals also love each other, don't they?”.\n“Yes "+name+"”, he said, “they love each other the same way we do”. \n\n“Oh, good”, "+name+" was pleased.";
			
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (rightColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = rightColumnX + (rightColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number for the second page
var predeterminedPageNumber = 16; // Change this to the desired page number
doc.setFontSize(10);

// Calculate x position to place page number in the right column
var xPosition = doc.internal.pageSize.getWidth() - 15; // 10 units from the right edge
var yPosition = doc.internal.pageSize.getHeight() - 15; // 10 units from the bottom edge

// Add the page number to the document
doc.text(xPosition, yPosition, ' ' + predeterminedPageNumber);
// Add a new page
    doc.addPage();

   // Content for the 9 page
   var gender = document.getElementById('gender').value;
	var text = (gender === 'Male') ? ""+name+" brushed his teeth with a smile.\n“Tomorrow is my birthday”, he thought. He rinsed his mouth and hung up his toothbrush. \nIt was dark outside.  "+name+" wished the moon will go away and the sun will rise sooner than soon. \nHe put on his red pajamas and climbed into his little wooden bed." : ""+name+" brushed her teeth with a smile.\n“Tomorrow is my birthday”, she thought. She rinsed her mouth and hung up her toothbrush. \nIt was dark outside.  "+name+" wished the moon will go away and the sun will rise sooner than soon. \nShe put on her red pajamas and climbed into her little wooden bed.";
		
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (leftColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = leftColumnX + (leftColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number
var predeterminedPageNumber = 17; // Change this to the desired page number
doc.setFontSize(10);
doc.text(10, doc.internal.pageSize.getHeight() - 10, ' ' + predeterminedPageNumber);


// Add a new page
    doc.addPage();

      // Content for the 10 page
    var gender = document.getElementById('gender').value;
	var pet = document.getElementById('pet').value;
	var figureFather = document.getElementById('figureFather').value;
	
   var text = (gender === 'Male') ? " “Goodnight”, said his "+name+", “sleep tight”. \n“Tomorrow is really going to come, right?” "+name+" asked. \n\n“"+name+", for tomorrow to come you first need to sleep. The earth is round like a ball and needs time to turn till it meets up with the sun again”. \n\n“Oh”, now "+name+" is confused. \n“Yes, the sun always shines and the earth never stops turning. So when the sun comes out and kiss you on the cheeck, it will be your birthday”, said his "+figureMother+" and tuck him in. ": " “Goodnight”, said her "+name+", “sleep tight”. \n“Tomorrow is really going to come, right?” "+name+" asked. \n\n“"+name+", for tomorrow to come you first need to sleep. The earth is round like a ball and needs time to turn till it meets up with the sun again”. \n\n“Oh”, now "+name+" is confused. \n“Yes, the sun always shines and the earth never stops turning. So when the sun comes out and kiss you on the cheeck, it will be your birthday”, said her "+figureMother+" and tuck her in. ";
		
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (rightColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = rightColumnX + (rightColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number for the second page
var predeterminedPageNumber = 20; // Change this to the desired page number
doc.setFontSize(10);

// Calculate x position to place page number in the right column
var xPosition = doc.internal.pageSize.getWidth() - 15; // 10 units from the right edge
var yPosition = doc.internal.pageSize.getHeight() - 15; // 10 units from the bottom edge

// Add the page number to the document
doc.text(xPosition, yPosition, ' ' + predeterminedPageNumber);

// Add a new page
    doc.addPage();

   // Content for the 11 page
     var gender = document.getElementById('gender').value;
	var text = (gender === 'Male') ? ""+name+" thought he would never get to sleep. He was too excited. \n\nTomorrow was going to be his birthday. ":""+name+" thought she would never get to sleep. She was too excited. \n\nTomorrow was going to be her birthday. ";

    var text = (gender === 'Male') ? ""+name+" thought he would never get to sleep. He was too excited. \n\nTomorrow was going to be his birthday. ":""+name+" thought she would never get to sleep. She was too excited. \n\nTomorrow was going to be her birthday. ";
		
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (leftColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = leftColumnX + (leftColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number
var predeterminedPageNumber = 21; // Change this to the desired page number
doc.setFontSize(10);
doc.text(10, doc.internal.pageSize.getHeight() - 10, ' ' + predeterminedPageNumber);

// Add a new page
    doc.addPage();

      // Content for the 12 page
    var gender = document.getElementById('gender').value;
	var figureFather = document.getElementById('figureFather').value;
	var figureFatherName = document.getElementById('figureFatherName').value;
	
 var text = (gender === 'Male') ? "When he opened his eyes it was light outside. \n"+figureFather+" "+figureFatherName+" was waking him up. “Get up sleepy head it is your Birthday!” \n\n"+name+"'s little bed sqeecked as he jumped out of bed. “It is my birthday! Hooray !” he shouted. \nHe put on his slippers and ran out of the room. \n\nEveryone was waiting in the kitchen. ": "When she opened her eyes it was light outside. \n"+figureFather+" "+figureFatherName+" was waking her up. “Get up sleepy head it is your Birthday!” \n\n"+name+"'s little bed sqeecked as she jumped out of bed. “It is my birthday! Hooray !” she shouted. \nHe put on her slippers and ran out of the room. \n\nEveryone was waiting in the kitchen. ";
		
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (rightColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = rightColumnX + (rightColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number for the second page
var predeterminedPageNumber = 24; // Change this to the desired page number
doc.setFontSize(10);

// Calculate x position to place page number in the right column
var xPosition = doc.internal.pageSize.getWidth() - 15; // 10 units from the right edge
var yPosition = doc.internal.pageSize.getHeight() - 15; // 10 units from the bottom edge

// Add the page number to the document
doc.text(xPosition, yPosition, ' ' + predeterminedPageNumber);

// Add a new page
    doc.addPage();

   // Content for the 13 page
    var gender = document.getElementById('gender').value;

    var text = (gender === 'Male') ? " “Good Morning!”, shout "+name+", jumping up and down. \n\nEveryone took a deep breath. \n“Happy birthday to you, happy birthday to you”, they sang loudly. "+name+" screamed. “Hiep hiep, hooray!” Everyone laughed. ":"“Good Morning!”, shout "+name+", jumping up and down. \n\nEveryone took a deep breath. \n“Happy birthday to you, happy birthday to you”, they sang loudly. "+name+" screamed. “Hiep hiep, hooray!” Everyone laughed. ";
		
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (leftColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = leftColumnX + (leftColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number
var predeterminedPageNumber = 25; // Change this to the desired page number
doc.setFontSize(10);
doc.text(10, doc.internal.pageSize.getHeight() - 10, ' ' + predeterminedPageNumber);

// Add a new page
    doc.addPage();

      // Content for the 14 page
   var gender = document.getElementById('gender').value;
	var figureMother = document.getElementById('figureMother').value;
	var figureFatherName = document.getElementById('figureFatherName').value;

   var text = (gender === 'Male') ? " “Come into the lounge”, they all said. \n\nIn the lounge was a big yellow cake. “Now I know” said "+name+" to his "+figureMother+", “that’s what you were icing yesterday!” \n\n“Yes” laughed his "+figureMother+". “You can have a piece after opening all your presents”. " : " “Come into the lounge”, they all said. \n\nIn the lounge was a big yellow cake. “Now I know” said "+name+" to her "+figureMother+", “that’s what you were icing yesterday!” \n\n“Yes” laughed her "+figureMother+". “You can have a piece after opening all your presents”. ";
		
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (rightColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = rightColumnX + (rightColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number for the second page
var predeterminedPageNumber = 28; // Change this to the desired page number
doc.setFontSize(10);

// Calculate x position to place page number in the right column
var xPosition = doc.internal.pageSize.getWidth() - 15; // 10 units from the right edge
var yPosition = doc.internal.pageSize.getHeight() - 15; // 10 units from the bottom edge

// Add the page number to the document
doc.text(xPosition, yPosition, ' ' + predeterminedPageNumber);

// Add a new page
    doc.addPage();

   // Content for the 15 page
    var gender = document.getElementById('gender').value;
	var figureFather = document.getElementById('figureFather').value;
	var favouriteToy = document.getElementById('favouriteToy').value;

   var text = (gender === 'Male') ? ""+name+" looked at his "+figureFather+", he was holding a present.  “You almost saw this yesterday when you came into the bedroom”, he said. “I had to hide it under the bed”. \n\n"+name+" took the present and sat on the floor.  He tore off the purple wrapping paper. \n\n“You got me a "+favouriteToy+", just what I always wanted!”. \n“Thank you, I love you so much. ” "+name+"'s little wooden cheeks hurt from all the smiling. ": ""+name+" looked at her "+figureFather+", he was holding a present.  “You almost saw this yesterday when you came into the bedroom”, he said. “I had to hide it under the bed”. \n\n"+name+" took the present and sat on the floor.  She tore off the purple wrapping paper. \n\n“You got me a "+favouriteToy+", just what I always wanted!”. \n“Thank you, I love you so much. ” "+name+"'s little wooden cheeks hurt from all the smiling. " ;
		
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (leftColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = leftColumnX + (leftColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number
var predeterminedPageNumber = 29; // Change this to the desired page number
doc.setFontSize(10);
doc.text(10, doc.internal.pageSize.getHeight() - 10, ' ' + predeterminedPageNumber);


// Add a new page
    doc.addPage();

      // Content for the 16 page
   var gender = document.getElementById('gender').value;
	var figureOlderWomanName = document.getElementById('figureOlderWomanName').value;
	var favouriteToy = document.getElementById('favouriteToy').value;

   var text = (gender === 'Male') ? ""+figureOlderWomanName+" was holding a big brown paper bag. “This is for you my dear.” \n\n"+name+" took the packet. He sat down and looked inside. Inside was a long purple scarf. \n\n“You were knitting this!”. \n“Yes”, said "+figureOlderWomanName+". \n“It’s beautiful,” he said and put the scarf on. They gave each other a big hug. ":""+figureOlderWomanName+" was holding a big brown paper bag. “This is for you my dear.” \n\n"+name+" took the packet. She sat down and looked inside. Inside was a long purple scarf. \n\n“You were knitting this!”. \n“Yes”, said "+figureOlderWomanName+". \n“It’s beautiful,” she said and put the scarf on. They gave each other a big hug. ";
		
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (rightColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = rightColumnX + (rightColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number for the second page
var predeterminedPageNumber = 32; // Change this to the desired page number
doc.setFontSize(10);

// Calculate x position to place page number in the right column
var xPosition = doc.internal.pageSize.getWidth() - 15; // 10 units from the right edge
var yPosition = doc.internal.pageSize.getHeight() - 15; // 10 units from the bottom edge

// Add the page number to the document
doc.text(xPosition, yPosition, ' ' + predeterminedPageNumber);
// Add a new page
    doc.addPage();

   // Content for the 17 page
   var gender = document.getElementById('gender').value;
	var figureFriend = document.getElementById('figureFriend').value;
	var figureFriendName = document.getElementById('figureFriendName').value;

    var text = (gender === 'Male') ? "“Don’t forget about my present,” said his "+figureFriend+". "+figureFriendName+" gave him a big blue envelope. \n\n“Thank you very much "+figureFriendName+"!.” He opened the envelope. Inside the envelope was a beautiful card. \n\n“I chose that” "+figureFriendName+" said “look inside”. \n“Money!” shouted "+name+". “You knew I wanted to save money for something special”. They high five. ": "“Don’t forget about my present,” said her "+figureFriend+". "+figureFriendName+" gave her a big blue envelope. \n\n“Thank you very much "+figureFriendName+"!.” She opened the envelope. Inside the envelope was a beautiful card. \n\n“I chose that” "+figureFriendName+" said “look inside”. \n“Money!” shouted "+name+". “You knew I wanted to save money for something special”. They high five. ";
		
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (leftColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = leftColumnX + (leftColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number
var predeterminedPageNumber = 33; // Change this to the desired page number
doc.setFontSize(10);
doc.text(10, doc.internal.pageSize.getHeight() - 10, ' ' + predeterminedPageNumber);

// Add a new page
    doc.addPage();

      // Content for the 18 page
    var gender = document.getElementById('gender').value;
	var figureMother = document.getElementById('figureMother').value;

   var text = (gender === 'Male') ? ""+name+" looked at his family then looked at all his presents. \n\nSuddenly he asked: “What about all the people who don’t get any presents on their birthday?” \n\n“Don’t worry”, said his "+figureMother+", “there’s one present we can give everybody, everyday”. \n\n “What’s that?” asked "+name+". ":""+name+" looked at her family then looked at all her presents. \n\nSuddenly she asked: “What about all the people who don’t get any presents on their birthday?” \n\n“Don’t worry”, said her "+figureMother+", “there’s one present we can give everybody, everyday”. \n\n “What’s that?” asked "+name+". ";
		
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (rightColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = rightColumnX + (rightColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number for the second page
var predeterminedPageNumber = 36; // Change this to the desired page number
doc.setFontSize(10);

// Calculate x position to place page number in the right column
var xPosition = doc.internal.pageSize.getWidth() - 15; // 10 units from the right edge
var yPosition = doc.internal.pageSize.getHeight() - 15; // 10 units from the bottom edge

// Add the page number to the document
doc.text(xPosition, yPosition, ' ' + predeterminedPageNumber);

// Add a new page
    doc.addPage();

   // Content for the 19 page
   var gender = document.getElementById('gender').value;
	var figureFriend = document.getElementById('figureFriend').value;
	var figureFriendName = document.getElementById('figureFriendName').value;

    var text = (gender === 'Male') ? " “Kindness, love and respect”, said his "+figureFather+". \n\n“That’s right, but now it is time for cake” said his "+figureMother+". \n“This is my best birthday ever” he thought as he took a big breath to blow out the candles on his cake. \n\nWow! "+name+" blew out all the candles in one blow. That means he can make a wish. \n\n"+name+" knows immediately what he is going to wish for - can you guess? ":" “Kindness, love and respect”, said her "+figureFather+". \n\n“That’s right, but now it is time for cake” said her "+figureMother+". \n“This is my best birthday ever” she thought as she took a big breath to blow out the candles on her cake. \n\nWow! "+name+" blew out all the candles in one blow. That means she can make a wish. \n\n"+name+" knows immediately what she is going to wish for - can you guess? ";
		
doc.setFontSize(16); // Set font size
var textLines = doc.splitTextToSize(text, 90); // Split text into lines for the right column

// Calculate total height of text
var textHeight = textLines.length * 9; // Adjusting line height to 9

// Calculate vertical position to center text within the right column
var yPosition = 0; // Reset yPosition for the 6th page
var initialY = (leftColumnHeight - textHeight) / 2; // Calculate initial y position

// Calculate the y position for the first line
var firstLineY = initialY;

// Loop through each line of text and add it to the document
textLines.forEach(function (line) {
    // Calculate the width of the current line
    var lineWidth = doc.getTextWidth(line);

    // Calculate the x position to center align the line
    var xPosition = leftColumnX + (leftColumnWidth - lineWidth) / 2;

    // Add the line to the document
    doc.text(xPosition, firstLineY, line);

    // Move to the next line
    firstLineY += 9; // Adjusted line height
});
// Add predetermined page number
var predeterminedPageNumber = 37; // Change this to the desired page number
doc.setFontSize(10);
doc.text(10, doc.internal.pageSize.getHeight() - 10, ' ' + predeterminedPageNumber);

// Add a new page
    doc.addPage();

 
    // Save the PDF
    doc.save("form.pdf");
  
    }
</script>
  
</head>
<body>
<div class="GFG" id="leftContainer">
    <form>
        <fieldset>
            <legend>Group 1: Information of child</legend>
            <label for="name">Nickname of Child:</label>
            <input type="text" id="name" name="Name" required><br><br>
            <label for="gender">Gender:</label>
            <select id="gender" name="gender">
                <option value=""> </option>
                <option value="Female">Female</option>
                <option value="Male">Male</option>
            </select><br><br>
            <label for="hometown">Hometown:</label>
            <input type="text" id="hometown" name="Hometown"><br><br>
            <label for="favouriteToy">Favourite toy (e.g ball):</label>
            <input type="text" id="favouriteToy" name="favouriteToy"><br><br>
            <label for="birthday">Date of Birth (e.g 5 January):</label>
            <input type="text" id="birthday" name="birthday"><br><br>
            <label for="pet">Name of pet:</label>
            <input type="text" id="pet" name="pet"><br><br>
        </fieldset>

        <fieldset>
            <legend>Group 2: Information of Parents</legend>
            <label for="figureMother">Mother/Female Figure involved in Child's life:</label>
            <select id="figureMother" name="figureMother">
                <option value=""> </option>
                <option value="Mommy">mommy</option>
                <option value="Aunt">aunt</option>
            </select><br><br>
            <label for="figureMotherName">Name of Mother/Female Figure (used by child):</label> 
            <input type="text" id="figureMotherName" name="FigureMotherName"><br><br>
            <label for="figureFather">Father/Male Figure involved in Child's life:</label>
            <select id="figureFather" name="figureFather">
                <option value=""> </option>
                <option value="Daddy">daddy</option>
                <option value="Uncle">uncle</option>
            </select><br><br>
            <label for="figureFatherName">Name of Father/Male Figure (used by child):</label> 
            <input type="text" id="figureFatherName" name="figureFatherName"><br><br>
            <label for="figureOlderWomanName">Nick name of older woman involved in child’s life (e.g Granny):</label> 
            <input type="text" id="figureOlderWomanName" name="figureOlderWomanName"><br><br>
        </fieldset>

        <fieldset>
            <legend>Group 3: Information of favourite friend</legend>
            <label for="figureFriend">Who does the child like playing with the most:</label>
            <select id="figureFriend" name="figureFriend">
                <option value=""> </option>
                <option value="brother">brother</option>
                <option value="sister">sister</option>
                <option value="friend">friend</option>
            </select><br><br>
            <label for="figureFriendName">Name of the person the child likes playing with:</label> 
	        <input type="text" id="figureFriendName" name="figureFriendName"><br><br>
            <label for="figureFriendGender">Gender:</label>
	        <select type="dropdown" name="figureFriendGender" id="figureFriendGender">
	            <option value=" "> </option>
	            <option value="Female ">Female</option>
	            <option value="Male">Male</option>
	        </select><br><br>
        </fieldset>
    </form>
</div>

<div id="rightContainer">
    <form>
        <fieldset>
            <legend>Group 4: Special Message</legend>
            <label for="specialMessage">Special Message for the child. This will be printed in the book (e.g Love you always):</label> 
	        <input type="text" id="specialMessage" name="specialMessage"><br><br>
	        <label for="bookGift">Name of the Person giving the book to the child (e.g From Mommy):</label> 
	        <input type="text" id="bookGift" name="bookGift"><br><br>
        </fieldset>

        <fieldset>
            <legend>Group 5: Agent</legend>
            <label for="agentName">Agent Name (as it will be printed in the book):</label> 
	        <input type="text" id="agentName" name="agentName"><br><br>
	        <label for="agentContact">Agent Contact Detail (as it will be printed in the book):</label> 
	        <input type="text" id="agentContact" name="agentContact"><br><br>
        </fieldset>



        <button class="button button1" onclick="downloadPDF()">Generate PDF</button>
    </form>
</div>
</body>
</html>
Let's Chat!