Is "pdf_new" a built-in function?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sammyphp
Forum Newbie
Posts: 17
Joined: Tue Jul 03, 2007 2:39 am

Is "pdf_new" a built-in function?

Post by sammyphp »

Hi all,

1. "pdf_new" is used to create pdf document.
Is "pdf_new" a built-in functions of php 4 or 5 (ie. every linux server must have this function?)?

2. Could we create a complex report with multiple bands with pdf_new?

3. Does "pdf_new" relate to fpdf? What are the difference?

Thanks in advance.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

1. pdf_new is a function of the pdf module. It can either be built-in, loaded as shared object or not available at all.
2. probably
3. fpdf is another library which you can finde here: http://fpdf.org/
sammyphp
Forum Newbie
Posts: 17
Joined: Tue Jul 03, 2007 2:39 am

Post by sammyphp »

Hi volka,

Thank you for your reply.

1. If pdf_new is not built-in, how to install it on linux? Could we do it ourself or need the permission of web hosting companies?

2. It seems that using pdf_new, it is a process of trial and error and not wysiwyg tool.
The process of creating this pdf seems to go back to the day of generating text report when there is no wysiwyg tool.
Do people usually pdf_new or fpdf, instead of using some kind of pdf report generating tool (eg.Navicat ) ?

3. Is fpdf more easier or convenient than pdf_new?

Thanks in advance
sammyphp
Forum Newbie
Posts: 17
Joined: Tue Jul 03, 2007 2:39 am

Post by sammyphp »

Any more comments???
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Unless you have a (virtual) root server it's very likely your provider has to install the module for you.
btw: pdf_new is only one function of the pdf module.
sammyphp
Forum Newbie
Posts: 17
Joined: Tue Jul 03, 2007 2:39 am

Post by sammyphp »

Thank you for your info.

It is said that
pdf_new require installation of PDFlib GmbH.
it would require a recompile of php in order to add this module

Did anyone try fpdf or PHP-Pdf?

fpdf - without using the PDFlib library
PHP-Pdf - without installing any modules

Thanks in advance. :D
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Did you try them?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I suggest starting with fpdf. Since it's pure php code and
http://www.fpdf.org/ wrote:FPDF requires no extension (except zlib to activate compression) and works with PHP4 and PHP5.
you don't need the help of the provider to install and use it.
sammyphp
Forum Newbie
Posts: 17
Joined: Tue Jul 03, 2007 2:39 am

Post by sammyphp »

@feyd: Not yet. I just gather info. of php and pdf. My boss is still considering the cost of the application. I have not started to learn php, but gather relevant info.

@volka: As you said I don't need the help of the provider to install and use it, if the users use "view source code" option of a browser, could they see the pdf code generation on screen?
It does not matter because users with different rights on mysql and even they see the source php+pdf code, it will not cause any damage to the data of database. Am I right?

Thanks in advance.
:P
Last edited by sammyphp on Mon Jul 09, 2007 10:09 pm, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Just as with generating images and other files, the PHP code will not show up in the result file unless your code does it purposefully.
sammyphp
Forum Newbie
Posts: 17
Joined: Tue Jul 03, 2007 2:39 am

Post by sammyphp »

@feyd: To clarify one thing...
In IE, "View>source" only show the final results of php code (there is no tag <?php>), but it is not the php source code we written.
The php source code (there is tag <?php>)is stored on linux server.

Am I right?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Yes.
Post Reply