D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
vitalityhealth
/
public_html
/
aa
/
invite
/
Filename :
cat-one-preview-one.php
back
Copy
<?php include("cn.php"); $selectRole = mysqli_query($con, "SELECT * FROM user WHERE userTid ='" . base64_decode(strtoupper($urlData[1])) . "' AND userCatid ='" . base64_decode(strtoupper($urlData[0])) . "' AND userUid ='" . $urlData[2] . "' ORDER BY userID DESC LIMIT 0,1"); $rowRole = mysqli_fetch_array($selectRole); $selectRole1 = mysqli_query($con,"SELECT * FROM card WHERE cardID ='".base64_decode(strtoupper($urlData[1]))."' ORDER BY cardID ASC"); $rowRole1 = mysqli_fetch_array($selectRole1); if($rowRole1['cardCategory'] == 1) { $cattype ='sukhmani-sahib-path'; }else if($rowRole1['cardCategory'] == 2){ $cattype ='griha-pravesh'; } else if($rowRole1['cardCategory'] == 3){ $cattype ='wedding-invitation'; } else if($rowRole1['cardCategory'] == 4){ $cattype ='happy-birthday'; } else if($rowRole1['cardCategory'] == 5){ $cattype ='happy-new-year'; } else if($rowRole1['cardCategory'] == 6){ $cattype ='baby-shower'; } else if($rowRole1['cardCategory'] == 7){ $cattype ='happy-diwali'; } $Arr = json_decode($rowRole['userDetails'], true); //$url = "card-update.php?cid=" . $_REQUEST['cid'] . "&tid=" . $_REQUEST['tid'] . "&uid=" . $_REQUEST['uid']; $url = $siteurl.$cattype."/card-update/".$urlData[0]."/".$urlData[1]."/".$urlData[2]; // var_dump($Arr); //$url1 = "cat-1-priview-1.php?cid=" . $_REQUEST['cid'] . "&tid=" . $_REQUEST['tid'] . "&uid=" . $_REQUEST['uid'] . "&flag=preview"; $url1 = $siteurl.$cattype."/".trim($rowRole1['cardPage'])."/".$urlData[0]."/".$urlData[1]."/".$urlData[2]."/preview"; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Image Preview</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <link rel="stylesheet" href="<?php echo $siteurl; ?>css1/style.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,700;1,600&display=swap" rel="stylesheet"> <style> a { color: white !important; } .articles { display: flex; justify-content: center; margin: 0px; padding: 0px; } .watermark { position: absolute; color: blue(255, 255, 255, 0.5); max-width: 100% !important; top: 0px; left: 0px } body { font-family: 'Montserrat', sans-serif; } </style> <style> @font-face { font-family: 'Funky Signature'; src: url('<?php echo $siteurl; ?>font/FunkySignature.woff2') format('woff2'), url('<?php echo $siteurl; ?>font/FunkySignature.woff') format('woff'); font-weight: normal; font-style: normal; font-display: swap; } @font-face { font-family: 'Signatie'; src: url('<?php echo $siteurl; ?>font/Signatie.woff2') format('woff2'), url('<?php echo $siteurl; ?>font/Signatie.woff') format('woff'); font-weight: normal; font-style: normal; font-display: swap; } </style> <style> @font-face { font-family: 'Lovelace Text'; src: url('<?php echo $siteurl; ?>font/LovelaceText-BoldItalic.woff2') format('woff2'), url('<?php echo $siteurl; ?>font/LovelaceText-BoldItalic.woff') format('woff'); font-weight: bold; font-style: italic; font-display: swap; } @font-face { font-family: 'Lovelace Text'; src: url('<?php echo $siteurl; ?>font/LovelaceText-Regular.woff2') format('woff2'), url('<?php echo $siteurl; ?>font/LovelaceText-Regular.woff') format('woff'); font-weight: normal; font-style: normal; font-display: swap; } @font-face { font-family: 'Bickley Script'; src: url('<?php echo $siteurl; ?>font/BickleyScript.woff2') format('woff2'), url('<?php echo $siteurl; ?>font/BickleyScript.woff') format('woff'); font-weight: normal; font-style: normal; font-display: swap; } @font-face { font-family: 'Carot Display'; src: url('<?php echo $siteurl; ?>font/CarotDisplay-Bold.woff2') format('woff2'), url('<?php echo $siteurl; ?>font/CarotDisplay-Bold.woff') format('woff'); font-weight: bold; font-style: normal; font-display: swap; } @font-face { font-family: 'Carot Display Med'; src: url('<?php echo $siteurl; ?>font/CarotDisplay-Medium.woff2') format('woff2'), url('<?php echo $siteurl; ?>font/CarotDisplay-Medium.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; } @font-face { font-family: 'Carot Display'; src: url('<?php echo $siteurl; ?>font/CarotDisplay-Regular.woff2') format('woff2'), url('<?php echo $siteurl; ?>font/CarotDisplay-Regular.woff') format('woff'); font-weight: normal; font-style: normal; font-display: swap; } body { padding: 0; margin: 0; } .normal-header { height: 80px; display: flex; align-items: center; justify-content: center; background-color: #180f5e; margin-bottom: 60px; } .normal-footer { padding: 100px 0; background-color: #180f5e; text-align: center; margin-top: 60px; } .normal-footer p { color: #fff; font-size: 14px; margin: 0 auto; max-width: 1060px; margin-bottom: 15px; } .normal-footer-logo { margin-bottom: 30px; display: block; } .normal-footer ul { display: flex; align-items: center; justify-content: center; margin-top: 20px; } .normal-footer ul li { margin: 0 6px; } .normal-footer ul li a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 14px; padding: 5px; line-height: 30px; color: #fff; background-color: rgba(255, 255, 255, 0.06); } .normal-footer ul li a svg { height: 15px !Important; } </style> <style> @font-face { font-family: 'Adobe Devanagari'; src: url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/AdobeDevanagari-Bold.woff2') format('woff2'), url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/AdobeDevanagari-Bold.woff') format('woff'); font-weight: bold; font-style: normal; font-display: swap; } @font-face { font-family: 'Adobe Gurmukhi'; src: url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/AdobeGurmukhi-Regular.woff2') format('woff2'), url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/AdobeGurmukhi-Regular.woff') format('woff'); font-weight: normal; font-style: normal; font-display: swap; } @font-face { font-family: 'Graphit'; src: url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/Graphit-Bold.woff2') format('woff2'), url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/Graphit-Bold.woff') format('woff'); font-weight: bold; font-style: normal; font-display: swap; } @font-face { font-family: 'Edwardian Scr Alt ITC TT'; src: url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/EdwardianScrAltITCTTBold.woff2') format('woff2'), url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/EdwardianScrAltITCTTBold.woff') format('woff'); font-weight: bold; font-style: normal; font-display: swap; } @font-face { font-family: 'Carot Display'; src: url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/CarotDisplay-Bold.woff2') format('woff2'), url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/CarotDisplay-Bold.woff') format('woff'); font-weight: bold; font-style: normal; font-display: swap; } @font-face { font-family: 'Futura'; src: url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/Futura-Dem.woff2') format('woff2'), url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/Futura-Dem.woff') format('woff'); font-weight: normal; font-style: normal; font-display: swap; } @font-face { font-family: 'Graphit'; src: url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/Graphit-Regular.woff2') format('woff2'), url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/Graphit-Regular.woff') format('woff'); font-weight: normal; font-style: normal; font-display: swap; } </style> <style> @font-face { font-family: 'Montserrat'; src: url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/Montserrat-Regular.woff2') format('woff2'), url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/Montserrat-Regular.woff') format('woff'); font-weight: normal; font-style: normal; font-display: swap; } @font-face { font-family: 'Montez'; src: url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/Montez-Regular.woff2') format('woff2'), url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/Montez-Regular.woff') format('woff'); font-weight: normal; font-style: normal; font-display: swap; } @font-face { font-family: 'Montserrat'; src: url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/Montserrat-SemiBold.woff2') format('woff2'), url('<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/font/Montserrat-SemiBold.woff') format('woff'); font-weight: 600; font-style: normal; font-display: swap; } .button-row { display: flex; justify-content: center; flex-wrap: wrap; } .button-row button { margin: 5px 10px; /* Add margin between buttons */ padding: 10px 20px; /* Add padding to buttons */ color: #fff; /* Set text color */ border: none; /* Remove button border */ border-radius: 5px; /* Add border radius */ cursor: pointer; /* Change cursor on hover */ } .button-row a { margin-right: 10px; /* Add margin between buttons */ padding: 10px 20px; /* Add padding to buttons */ color: #fff; /* Set text color */ border: none; /* Remove button border */ border-radius: 5px; /* Add border radius */ cursor: pointer; /* Change cursor on hover */ } .watermark { position: absolute; color: blue(255, 255, 255, 0.5); max-width: 100% !important; top: 0px; left: 0px; } @media(max-width:767px) { .cat-preview-mobile { min-width: 600px; left: 50%; position: relative; transform: translate(-50%, 0) scale(0.55); margin: -200px 0 !important; } } </style> </head> <body> <div class="normal-header"> <a herf="#"> <img src='<?php echo $siteurl; ?>images/Untitled-2(1).png' alt="image" style="width: 315px; margin: 0 auto; display:table;"> </a> </div> <div class="button-row"> <?php if ($urlData[3] == "preview") { ?> <button class="btn btn-info" onclick="downloadPNG()">Download PNG</button> <button class="btn btn-info" onclick="downloadJPG()">Download JPG</button> <button class="btn btn-info" onclick="downloadPDF()">Download PDF</button> <?php } else { ?> <a class="btn btn-success" href="<?php echo $url; ?>">Edit</a> <a href="<?php echo $url1; ?>" class="btn btn-info">Process</a> <?php } ?> </div> <br><br> <center id="capture" style=" margin: 0 auto; width: 100%; max-width: 680px;" class="cat-preview-mobile"> <div style="width:680 !important; height:400 !important; position: relative; overflow: hidden;"> <center> <div class="canvas_div_pdf"> <section class="articles" id="html-content-holder"> <table width="680" border="0" align="center" cellpadding="0" cellspacing="0" style="background: url(<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/img/bg1.jpg) center center; background-size: cover;"> <tbody style="width: 100%;"> <tr> <td style="text-align: center; padding: 84px 0 0;"><img src="<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/img/logo1.png" style="max-width: 132px;" alt=""></td> </tr> <tr> <td class="textSet" style="text-align: center; padding: 15px 0 10px; color: #a3060a; font-size: 20px; font-family: 'Futura';">॥ ੴ ਸਤਿਗੁਰੂ ਪ੍ਰਸਾਦ ॥</td> </tr> <tr> <td class="textSet" style="text-align: center; padding: 0px 0 0; color: #a3060a; font-size: 20px; font-family: 'Futura';">॥ ਲਖ ਖੁਸੀਆ ਪਾਤਿਸਾਹੀਆ ਜੇ ਸਤਿਗੁਰੁ ਨਦਰਿ ਕਰੇਇ॥</td> </tr> <tr> <td class="textSet" style="text-align: center; padding: 15px 0 20px; font-size: <?php echo $Arr[0]['size'] ? $Arr[0]['size'] : "20"; ?>px; color:<?php echo $Arr[0]['color'] ? $Arr[0]['color'] : "#a3060a"; ?>; font-family: 'Futura'; text-transform: uppercase;"><?php echo stripslashes($Arr[0]['title']) . "<br/>" . stripslashes($Arr[1]['title']); ?></td> </tr> <tr> <td class="textSet" style="text-align: center; padding: 0px 0 10px; font-size: <?php echo $Arr[2]['size'] ? $Arr[2]['size'] : "45"; ?>px; color:<?php echo $Arr[2]['color'] ? $Arr[2]['color'] : "#6c8219"; ?>; font-family: 'Edwardian Scr Alt ITC TT';"><?php echo stripslashes($Arr[2]['title']); ?></td> </tr> <tr> <td class="textSet" style="text-align: center; padding: 0px 0 10px; font-size: <?php echo $Arr[3]['size'] ? $Arr[3]['size'] : "20"; ?>px; color:<?php echo $Arr[3]['color'] ? $Arr[3]['color'] : "#a3060a"; ?>; font-family: 'Futura'; text-transform: uppercase;"><?php echo stripslashes($Arr[3]['title']); ?></td> </tr> <tr> <td class="textSet" style="text-align: center; padding: 0px 0 10px; font-size: <?php echo $Arr[4]['size'] ? $Arr[4]['size'] : "45"; ?>px; color:<?php echo $Arr[4]['color'] ? $Arr[4]['color'] : "#6c8219"; ?>; font-family: 'Edwardian Scr Alt ITC TT';"><?php echo stripslashes($Arr[4]['title']); ?></td> </tr> <tr> <td class="textSet" style="text-align: center; padding: 0px 0 20px; font-size: <?php echo $Arr[5]['size'] ? $Arr[5]['size'] : "20"; ?>; color: <?php echo $Arr[5]['color'] ? $Arr[5]['color'] : "#a3060a"; ?>; font-family: 'Futura'; text-transform: uppercase;"> at<br> <?php echo stripslashes($Arr[5]['title']) . "<br>" . stripslashes($Arr[6]['title']); ?> </td> </tr> <tr> <td> <div class="textSet" style="display: flex; justify-content: center; align-items: center;"> <div class="textSet" style="font-size: <?php echo $Arr[7]['size'] ? $Arr[7]['size'] : "20"; ?>px; color: <?php echo $Arr[7]['color'] ? $Arr[7]['color'] : "#6c8219"; ?>; font-family: 'Futura'; text-transform: uppercase;"> <?php echo $Arr[7]['title']; ?></div> <div class="textSet" style="color: <?php echo $Arr[8]['color'] ? $Arr[8]['color'] : "#6c8219"; ?>; font-size: <?php echo $Arr[8]['size'] ? $Arr[8]['size'] : "40"; ?>px; margin: 0 10px; border-left: 1px solid #d5ae85; padding: 0 7px; border-right: 1px solid #d5ae85; line-height: 1em; font-family: 'Futura'; text-transform: uppercase;"><?php echo $Arr[8]['title']; ?></div> <div class="textSet" style="color:<?php echo $Arr[9]['color'] ? $Arr[9]['color'] : "#6c8219"; ?>; font-size: <?php echo $Arr[9]['size'] ? $Arr[9]['size'] : "20"; ?>px; font-family: 'Futura'; text-transform: uppercase;">at <?php echo $Arr[7]['title']; ?></div> </div> </td> </tr> <tr> <td class="textSet" style="color: <?php echo $Arr[10]['color'] ? $Arr[10]['color'] : "#6c8219"; ?>; font-size: <?php echo $Arr[10]['size'] ? $Arr[10]['size'] : "20"; ?>px; text-align: center; padding: 15px 0 0; margin: 0 10px; font-family: 'Futura'; text-transform: uppercase;"> <?php echo stripslashes($Arr[10]['title']); ?> </td> </tr> <tr> <td class="textSet" style="text-align: center; padding: 15px 0 120px; font-size: <?php echo $Arr[11]['size'] ? $Arr[11]['size'] : "20"; ?>px; color: <?php echo $Arr[11]['color'] ? $Arr[11]['color'] : "#a3060a"; ?>; font-family: 'Futura'; text-transform: uppercase;"> <?php echo stripslashes($Arr[11]['title']) . "<br>" . stripslashes($Arr[12]['title']); ?> </td> </tr> </tbody> </table> </div> </section> <?php if ($urlData[3] != "preview") { ?> <div><img src='<?php echo $siteurl; ?>sukhmani-sahib-path/temp1/watermark.png' class="watermark" alt="image" style="max-width: 520px;"></div> <?php } ?> </div> </center> </center> <div class="normal-footer"> <div class="container"> <a herf="#" class="normal-footer-logo"> <img src='<?php echo $siteurl; ?>images/Untitled-2(1).png' alt="image" style="width: 315px; margin: 0 auto; display:table;"> </a> <p>METHER INFOTECH PTY LTD acknowledges the Traditional Owners of the lands across Australia as the continuing custodians of Country and Culture. We pay our respect to First Nations peoples and their Elders, past and present.</p> <p>Copyright © 2024 METHER INFOTECH PTY LTD All Rights Reserved | Powered By Golden Sparrow Technologies | Version 2.42</p> <div class="text-center"> <ul class="list-unstyled mb-0 footer-social"> <li><a href="https://fb.com/au.mether.info"><svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512" style="fill: #fff;"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --> <path d="M400 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h137.25V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.27c-30.81 0-40.42 19.12-40.42 38.73V256h68.78l-11 71.69h-57.78V480H400a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48z" /> </svg></i></a></li> <li> <a href="#"><svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512" style="fill: #fff;"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --> <path d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"></path> </svg></a></li> <li><a href="#"><svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512" style="fill: #fff;"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --> <path d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z" /> </svg></a></li> <li> <a target="_blank" href="https://www.tiktok.com/@metherinfotech?_t=8iAZfoiENv7&_r=1"> <svg id="Capa_1" enable-background="new 0 0 512 512" height="1em" style="fill: #fff;" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"> <g> <path d="m480.32 128.39c-29.22 0-56.18-9.68-77.83-26.01-24.83-18.72-42.67-46.18-48.97-77.83-1.56-7.82-2.4-15.89-2.48-24.16h-83.47v228.08l-.1 124.93c0 33.4-21.75 61.72-51.9 71.68-8.75 2.89-18.2 4.26-28.04 3.72-12.56-.69-24.33-4.48-34.56-10.6-21.77-13.02-36.53-36.64-36.93-63.66-.63-42.23 33.51-76.66 75.71-76.66 8.33 0 16.33 1.36 23.82 3.83v-62.34-22.41c-7.9-1.17-15.94-1.78-24.07-1.78-46.19 0-89.39 19.2-120.27 53.79-23.34 26.14-37.34 59.49-39.5 94.46-2.83 45.94 13.98 89.61 46.58 121.83 4.79 4.73 9.82 9.12 15.08 13.17 27.95 21.51 62.12 33.17 98.11 33.17 8.13 0 16.17-.6 24.07-1.77 33.62-4.98 64.64-20.37 89.12-44.57 30.08-29.73 46.7-69.2 46.88-111.21l-.43-186.56c14.35 11.07 30.04 20.23 46.88 27.34 26.19 11.05 53.96 16.65 82.54 16.64v-60.61-22.49c.02.02-.22.02-.24.02z" /> </g> </svg> </a> </li> </ul> </div> </div> </div> <!--<section class="articles" id="html-content-holder">--> <!-- <table>--> <!-- <tr>--> <!-- <td style="border:1px solid #000;"><center><img src="category/<?php echo $row['image']; ?>" alt="" /></center></td>--> <!-- </tr>--> <!-- <tr>--> <!-- <td style="border:1px solid #000;background:#000;"><center><h2 style="color:#fff;"><?php echo $row['title']; ?></h2></center></td>--> <!-- </tr>--> <!-- </table>--> <!--</section>--> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script> <script> function downloadPNG() { html2canvas(document.getElementById("capture")).then(canvas => { const originalWidth = canvas.width; const originalHeight = canvas.height; const padding = 5; // 40 pixels of padding around the image // Create a new canvas with padding const paddedCanvas = document.createElement('canvas'); paddedCanvas.width = originalWidth + 2 * padding; paddedCanvas.height = originalHeight + 2 * padding; const ctx = paddedCanvas.getContext('2d'); // Draw the original image onto the padded canvas with padding ctx.fillStyle = '#ffffff'; // Optional: fill background with white ctx.fillRect(0, 0, paddedCanvas.width, paddedCanvas.height); ctx.drawImage(canvas, padding, padding, originalWidth, originalHeight); // Create download link for the padded canvas const link = document.createElement('a'); link.download = 'invitation.png'; link.href = paddedCanvas.toDataURL("image/png", 1.0); link.click(); }); } function downloadJPG() { html2canvas(document.getElementById("capture")).then(canvas => { const originalWidth = canvas.width; const originalHeight = canvas.height; const padding = 5; // 40 pixels of padding around the image // Create a new canvas with padding const paddedCanvas = document.createElement('canvas'); paddedCanvas.width = originalWidth + 2 * padding; paddedCanvas.height = originalHeight + 2 * padding; const ctx = paddedCanvas.getContext('2d'); // Draw the original image onto the padded canvas with padding ctx.fillStyle = '#ffffff'; // Optional: fill background with white ctx.fillRect(0, 0, paddedCanvas.width, paddedCanvas.height); ctx.drawImage(canvas, padding, padding, originalWidth, originalHeight); // Create download link for the padded canvas const link = document.createElement('a'); link.download = 'invitation.jpg'; link.href = paddedCanvas.toDataURL("image/jpeg", 1.0); link.click(); }); } function downloadPDF() { html2canvas(document.getElementById("capture")).then(canvas => { const { jsPDF } = window.jspdf; const pdf = new jsPDF(); // Get the width and height of the PDF page const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); // Generate the image data in JPEG format const imgData = canvas.toDataURL('image/jpeg'); // Add the image to the PDF and cover the entire page pdf.addImage(imgData, 'JPEG', 0, 0, pdfWidth, pdfHeight); pdf.save("invitation.pdf"); }); } </script> <script src="https://www.google.com/recaptcha/enterprise.js?render=6LfbcgAqAAAAAOE-fvBHUyV7VRni4Ry62SGEE1Ir"></script> <script> function onClick(e) { e.preventDefault(); grecaptcha.enterprise.ready(async () => { const token = await grecaptcha.enterprise.execute('6LfbcgAqAAAAAOE-fvBHUyV7VRni4Ry62SGEE1Ir', { action: 'LOGIN' }); }); } </script> </body> </html>