28, May 2012

Question about PDF and php - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: Question about PDF and php
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: Question about PDF and php  (Read 1535 times)
Sandwich Artist
*
Posts: 25
186 credits
Members referred : 0


« on: Mar 12, 2008, 09:13:55 pm »

Does any one know if its possible to take variables from PHP and insert them into a PDF document?  I'm working on something now that would make things a lot easier if this was possible?  Any ideas
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Mar 12, 2008, 11:16:49 pm »

check fpdf.org or search for fpdi to add content to existing pdfs

Chicken-run Manager
*
Posts: 9
96 credits
Members referred : 0


« Reply #2 on: Apr 30, 2008, 07:08:47 pm »

i don't have much idea about this.
you should try with google to solve .


<snip /> go away spammer!
« Last Edit: Apr 30, 2008, 07:34:54 pm by Olaf »
What a dork
*
Posts: 16
116 credits
Members referred : 1


« Reply #3 on: May 26, 2008, 10:13:29 pm »

Dynamic pdf documents with PHP
R&OS: pdf class
http://www.ros.co.nz/pdf/

HTML to PDF converter
http://www.digitaljunkies.ca/dompdf/about.php#overview
Where are my glasses?
*
Posts: 23
146 credits
Members referred : 0



« Reply #4 on: May 27, 2008, 12:29:36 pm »

<?php
// create handle for new PDF document
$pdf = pdf_new();
// open a file
pdf_open_file($pdf, "philosophy.pdf");
// start a new page (A4)
pdf_begin_page($pdf, 595, 842);
// get and use a font object
$arial = pdf_findfont($pdf, "Arial", "host", 1); pdf_setfont($pdf, $arial, 10);
// print text
pdf_show_xy($pdf, "There are more things in heaven and earth, Horatio,",50, 750);
pdf_show_xy($pdf, "than are dreamt of in your philosophy", 50,730);
// end page
pdf_end_page($pdf);
// close and save file
pdf_close($pdf);
?>

Save this file, and then browse to it through your Web browser. PHP will execute the script, and a new PDF file will be created and stored in the location specified at the top of the script.

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7654
Tags : php pdf Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: Question about PDF and php
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 08:17:45 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.