0

I am having an Custom popup code which appears on the product page, I need to download this as PDF, I tried with dumpdf but couldn't succeeded. My code is following:

<?php
$prodArr = $this->getProdArr();;
$prodName =  $prodArr[0];
$prodSku =  $prodArr[1];
?>
<div class="modal fade" id="authentic-certificate" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content" >

        <div class="modal-body">
            <div id ="html-pdf">
               <h2 class ="cc_name" ><center><img style="width:51%" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?>wysiwyg/icotheme/zeus/logo/cc-logo-010.png"></center></h2>
               <h3 class="certificate_of_authenticity" ><span>CERTIFICATE OF AUTHENTICITY</span></h3>
               <P class="cerification">We certify that, to the best of knowledge the product,</P>
               <p><span class="prod_name"><?php echo $prodName; ?></span></p>
               <P class ="sku"> <span >SKU:<?php echo $prodSku; ?></span></P>
               <P class ="certification_text" >you have purchased is 100% authentic and guaranteed for its workmanship. The products sold on our platform is in accordance with the recognised industrial quality standards.</P>
               <img class="certificate-image" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);?>frontend/zeus/default/images/authentic-certificate-001.png">
               <img class="authentic_partner_image"  src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);?>frontend/zeus/default/images/authentic-partner.png">
           </div>
        </div>
    </div>
  </div>
</div>
0

Basically you need to use library for this task: you can use TCPDF or FPDF.

I prefer TCPDF - Link: Click Here

Step1. First you need to import this library in your code.

Step2. Then You need to convert this html into Pdf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.