Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 PHP Code: Create Basic PDF Jump to:  
Category: >> PHP Code >> Create Basic PDF Bookmark and Share

<< lastnext >>

Snippet Name: Create Basic PDF

Description: Very basic example of creating a PDF file.

Comment: (none)

Language: PHP
Highlight Mode: PHP
Last Modified: March 01st, 2009

<?PHP 
 
$cpdf = cpdf_open(0); 
cpdf_page_init($cpdf, 1, 0, 595, 842, 1.0); 
cpdf_add_outline($cpdf, 0, 0, 0, 1, "Page 1"); 
cpdf_begin_text($cpdf); 
cpdf_set_font($cpdf, "Times-Roman", 30, "WinAnsiEncoding"); 
cpdf_set_text_rendering($cpdf, 1); 
cpdf_text($cpdf, "Times Roman outlined", 50, 750); 
cpdf_end_text($cpdf); 
cpdf_moveto($cpdf, 50, 740); 
cpdf_lineto($cpdf, 330, 740); 
cpdf_stroke($cpdf); 
cpdf_finalize($cpdf); 
HEADER("Content-type: application/pdf"); 
cpdf_output_buffer($cpdf); 
cpdf_close($cpdf); 
 
?>
 


Free
Oracle Magazine
Subscriptions
and Oracle White Papers


SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 267 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?