Monday, October 19, 2009

Create pdf file uisng php

CREATE AN PDF

$pdf = pdf_new();

OPRN FILE

pdf_open_file($pdf);

SET THE INFORMATION
pdf_set_info($pdf, "Author","SIMON");

SET THE TITLE

pdf_set_info($pdf, "Title","TITLE GOES HERE");

BEGIN THE PAGE

pdf_begin_page($pdf, 300, 300);

SAVE PDF

pdf_save($pdf);

MOVE THE ORGIN

pdf_translate($pdf, 100, 100);

ROTATE BY 45 DEGREES

pdf_rotate($pdf, 45);

DRAW A SMALL RECTANGLE
pdf_rect($pdf, 0, 0, 20, 20);

KEEP THE STROKE
pdf_stroke($pdf);

SET THE PREVIOUS STAGE
pdf_restore($pdf);

SAVE THE PDF

END THE PDF PAGE
pdf_end_page($pdf);

pdf_close($pdf);

$data = pdf_get_buffer($pdf);

header('Content-type: application/pdf');

header('Content-disposition: inline; filename=simon.pdf');

header('Content-length: ' . strlen($data));

echo $data;
?>

Friday, September 18, 2009

TELESCOPE CAN FIND ‘OODLES’ OF EARTHS

The orbiting Kepler telescope has spotted a Jupiter sized planet around another star – a sighting that demonstrates it can see Earth-like planets if they are out there,scientists reported.

The planet, called HAT-P-7b,was already among the 300 or so known so called ex-trasolar planets, the team led by NASA reported, But measurements of its orbit by kepler
Show the telescope will be able to see smaller planets, they reported in the journal Science.

“We think it is likely that Kepler is going to find oodles and oodles of Earths”, astrobiologist Alan Boss of the Carnegie Institution of Washington told a news conference.