PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Iron Speed
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old March 24th, 2008, 06:58 PM
me_great me_great is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 7 me_great User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 56 m 31 sec
Reputation Power: 0
General - Creating pdfs with php

Hi,

I have been trying to create pdf with php for so long, but no success

I want to convert an already created php webpage to a pdf file. Please help.

Also, please tell me, is it feasible to convert the webpage into pdf on the click of a button of a webform, I am asking this because I suppose "pdflib" is required to be installed. So how will I achieve this fuctionality if I want the page to be converted to pdf on a website.

Please let me know, if I am not clear.

I want this at the earliest. Thanks so much in advance.

Reply With Quote
  #2  
Old March 24th, 2008, 10:56 PM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 530 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 21 h 4 m 40 sec
Reputation Power: 3
convert HTML content to PDF content

Hi me_great, welcome to the forums,
Similar to having a PHP script output the HTML page, have a script use the same source but output a PDF file. Then have a link go to that file indicating what "page" to create.
__________________
WP plugins - Error Reporting, Clean Options
http://www.mittineague.com/dev/er.php
http://www.mittineague.com/dev/co.php

Reply With Quote
  #3  
Old March 25th, 2008, 10:20 AM
me_great me_great is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 7 me_great User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 56 m 31 sec
Reputation Power: 0
creating pdf using php

Hi Mittineague,

Sorry for the inconvenience,But, can you please elaborate your reply.

Thanks.

Quote:
Originally Posted by Mittineague
Hi me_great, welcome to the forums,
Similar to having a PHP script output the HTML page, have a script use the same source but output a PDF file. Then have a link go to that file indicating what "page" to create.

Reply With Quote
  #4  
Old March 25th, 2008, 12:56 PM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 530 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 21 h 4 m 40 sec
Reputation Power: 3
pdf version of pages

Right now you have PHP script that outputs your HTML pages. Write script that uses the same content source (most likely a database, maybe XML files?) that you are using to create the pages, but outputs PDF files instead. Then link to that script on each page.

How are you generating your pages now?

Reply With Quote
  #5  
Old March 25th, 2008, 02:52 PM
me_great me_great is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 7 me_great User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 56 m 31 sec
Reputation Power: 0
creating pdfs with php

Hi Mittineague,

I got it what you tried to say. Thanks for that. I will try that and let you know if I still face some issue.

However, I have another problem , if you could help me with.

Whenever, I try and write "$pdf=pdf_new();", it gives the error message-- Fatal Error: pdf_new() not found.

I just wanted to know, where is the issue. FYI, I have installed the PDFLib.


Quote:
Originally Posted by Mittineague
Right now you have PHP script that outputs your HTML pages. Write script that uses the same content source (most likely a database, maybe XML files?) that you are using to create the pages, but outputs PDF files instead. Then link to that script on each page.

How are you generating your pages now?

Reply With Quote
  #6  
Old March 25th, 2008, 10:39 PM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 530 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 21 h 4 m 40 sec
Reputation Power: 3
pdf_new

$p = PDF_new() is the syntax for PHP ver. 4
The syntax for PHP ver. 5 is $p = new PDFlib()
http://us2.php.net/manual/en/ref.pdf.php

Reply With Quote
  #7  
Old March 26th, 2008, 08:33 AM
me_great me_great is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 7 me_great User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 56 m 31 sec
Reputation Power: 0
Pdfs in php

Hi Mittineague,

I get the same error for the PDFLib() class as well. But I got into the root of the things and found out that I was using PDFLib Lite instead of PDFLib.

And, PDFLib Lite doesnot support all the functions and classes used to create pdfs, thats why I kept on getting the error.

I cannot buy PDFLib, can you suggest any free tool , which I can use to create PDFs in php.

Thanks in advance.

Reply With Quote
  #8  
Old March 26th, 2008, 04:23 PM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 530 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 21 h 4 m 40 sec
Reputation Power: 3
PDFlib

I thought PDFlib was free except for commercial use. But maybe you want it for commercial use or things have changed. In any case, the PHP documentation addresses this desire http://us2.php.net/manual/en/faq.us...q.using.freepdf, but I can't recommend any as I haven't used them.

Reply With Quote
  #9  
Old April 10th, 2008, 03:48 AM
sachin.pramod sachin.pramod is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 2 sachin.pramod User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 11 sec
Reputation Power: 0
create pdf with php

Hi


I have been trying to create pdf with php for so long, but no success

I want to convert an already created php webpage to a pdf file. Please help.


Did u have the Code for that.Please let me know .I need it urgently.Please.............

Reply With Quote
  #10  
Old April 10th, 2008, 03:50 AM
sachin.pramod sachin.pramod is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 2 sachin.pramod User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 11 sec
Reputation Power: 0
hi
Can u help me in acheiving this functionality . i am beginner to Php and my client needs this work to be done as soon as possible.So please help me in getting this work done

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > General - Creating pdfs with php


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway