Help with some code?

Discussion in 'Programming/Scripts' started by tmpinsnty, Mar 15, 2018.

  1. tmpinsnty

    tmpinsnty Member

    Hey folks, I need a little help with some php code that generates a pdf. I believe I'm using an older version of ezPDF. I have a Wheezy LAMP stack if this helps.
    What I need this to accomplish is to create a pdf order form from the contents on the page. I had this on some older sites but need to port it over to the new software. It was on some old OScommerce sites and I have Zencart now. I am NOT the one that created either sites, I'm just the one fixing it.

    If you want to peak at what I am working with I have a test site set up at:

    The code that I have converted over to work with the Zencart is:
        <table width="100%"  border="0">
                <td class="main">Download the <a href="<?= zen_href_link(FILENAME_PDF,'products_id='.(int)$_GET['products_id'] ,'NONSSL'); ?>" target= "_blank" class="linkListing-navig"> ORDER FORM</a>, fill it out and email it directly to
                    <a href="mailto:<?= zen_get_configuration_key_value('STORE_OWNER_EMAIL_ADDRESS');?>" >
                        <?php echo zen_get_configuration_key_value('STORE_OWNER_EMAIL_ADDRESS');?> </a>
                                <br/><br/>If you can't open the file you need to get Acrobat Reader. <a href="" target="_blank" class="linkListing-navig">Click here</a> to get it free of charge</a>.<br></td>
                            <td valign="top"><a href="" target="_blank"><img src="images/getacro.gif" border="0"></a></td>
    If you go to the site and click on "ORDER FORM" you get sent to the site map/404 page. It's supposed to access a file pdf.php and generating a pdf order form that they can then print off. I'm running out of ideas on what might be wrong. I am getting an error in apache when I am on this page: client denied by server configuration: /var/www/, referer:

    Any Ideas?
    danny94 likes this.
  2. hello, @tmpinsnty
    base on your question, how to generates a pdf using php code?, i give the solution is show below php code to generate a simple pdf using php code..

    $pdf->new FPDF();
    $pdf->SetFont('Times New Roman','B',16);
    $pdf->Cell(80,10,'Hello Wold!!');

    thank you, I hope this php code is useful for you.

Share This Page