Jump to content

tables is pdf


khhalid

Recommended Posts

hi guys,

I'm need to create Declaration form in PDF format. I manage to create the PDF function which create the PDF file and set front etc.

 

Now I need the following:

Task1

Create three tables in newly created PDF;

Task2

Add some text in those tables;

Task3

select option box at the top which allow user to display one table and remove other tables

 

Here are the codes for creating PDF:

<?php
Function CreatePDF($Path)
{ 
//Resource create for PDF library
$pdf = PDF_new();	
pdf_open_file($pdf, $Path);
//Page diemention (A4)
pdf_begin_page($pdf, 595, 842);
//path of your TTF font directory 
$fontdir = "C:\WINDOWS\Fonts"; 
pdf_set_parameter($pdf, "FontOutline", "arialMyName=$fontdir\arial.ttf");
$arial = PDF_findfont($pdf,"arialMyName","host",0 );
//Set font size and font name
pdf_setfont($pdf, $arial, 10);
//print text
pdf_show_xy($pdf, "HBLB PDF",50, 750); 
pdf_show_xy($pdf, "New PDF created.", 50,730);
pdf_end_page($pdf);
pdf_close($pdf);

$status = "PDF created in: "   . $Path;
return $status;	
}
echo CreatePDF("C:\Projects\HBLB\FOD\htdocs\kh\php\HBLB.pdf");
?>

 

Many thanks for your help,

::)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.