Re: [PHP-DB] PDF BLOB to Email
Adrian Bruce wrote: Hi Hello, I have pdf's stored as a blob in a MySQL database, how can i set a script (PHP obviously!) to email these blobs as pdf files. The only way No, not Obviously, PHP is not well suited for many tasks (or has a high cost to get the suit tailored) :) If you branch out you'll find a whole world of alternatives that are easier to code and maintain server wise. All without the onslaught of PHP security vulnerabilities and performance bloats. i can think of at the moment is to write them to disk and then attach them to the mail before sending it. This doesn't seem that efficient but perhaps it is the only way?? Nope, its fine to attach it from a variable, in fact an example of how to do just that can be found at http://search.cpan.org/perldoc?Mail::Sender::Easy under the EXAMPLE header. you'd simply: my($pdf_guts) = $dbh-selectrow_array(q{SELECT pdf_guts FROM pdf_store WHERE id = '123'}); # http://search.cpan.org/perldoc?DBI PHP's mail() is a lame lame function with limited ability and even higher hackability, don't use it. HTH :) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF BLOB to Email
On 5/11/06, Adrian Bruce [EMAIL PROTECTED] wrote: Hi I have pdf's stored as a blob in a MySQL database, how can i set a script (PHP obviously!) to email these blobs as pdf files. The only way i can think of at the moment is to write them to disk and then attach them to the mail before sending it. This doesn't seem that efficient but perhaps it is the only way?? You'll need to get the pdf in memory then use chunk_split (http://au.php.net/chunk_split) to split it up.. Even though phpmailer reads them from the filesystem, it should give you an idea on how to attach docs: http://phpmailer.sourceforge.net -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF BLOB to Email
[snip] No, not Obviously, PHP is not well suited for many tasks (or has a high cost to get the suit tailored) :) [/snip] Obviously because i am posting to a PHP list, numpty! but thank you for the recommendation anyway. JupiterHost.Net wrote: Adrian Bruce wrote: Hi Hello, I have pdf's stored as a blob in a MySQL database, how can i set a script (PHP obviously!) to email these blobs as pdf files. The only way No, not Obviously, PHP is not well suited for many tasks (or has a high cost to get the suit tailored) :) If you branch out you'll find a whole world of alternatives that are easier to code and maintain server wise. All without the onslaught of PHP security vulnerabilities and performance bloats. i can think of at the moment is to write them to disk and then attach them to the mail before sending it. This doesn't seem that efficient but perhaps it is the only way?? Nope, its fine to attach it from a variable, in fact an example of how to do just that can be found at http://search.cpan.org/perldoc?Mail::Sender::Easy under the EXAMPLE header. you'd simply: my($pdf_guts) = $dbh-selectrow_array(q{SELECT pdf_guts FROM pdf_store WHERE id = '123'}); # http://search.cpan.org/perldoc?DBI PHP's mail() is a lame lame function with limited ability and even higher hackability, don't use it. HTH :) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF BLOB to Email
Adrian Bruce wrote: [snip] No, not Obviously, PHP is not well suited for many tasks (or has a high cost to get the suit tailored) :) [/snip] Obviously because i am posting to a PHP list, numpty! but thank you for the recommendation anyway. Obvious in that sense sure ,but just pointing out that there are much much much better alternatives to PHP to do your Database-to-web task. Most PHP folks have this image that since its so shiny its just the best which in fact is the opposite: the nice graphic designers that skin PHP projects do very well (images/css/html which are all independant of PHP), but its like dressing up a turd in silk, its still crap underneath :) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF BLOB to Email
Adrian Bruce wrote: [snip] No, not Obviously, PHP is not well suited for many tasks (or has a high cost to get the suit tailored) :) [/snip] Obviously because i am posting to a PHP list, numpty! but thank you for the recommendation anyway. Obvious in that sense sure ,but just pointing out that there are much much much better alternatives to PHP to do your Database-to-web task. Most PHP folks have this image that since its so shiny its just the best which in fact is the opposite: the nice graphic designers that skin PHP projects do very well (images/css/html which are all independant of PHP), but its like dressing up a turd in silk, its still crap underneath :) A bit indelicate for posting to a PHP list, don't you think? If that's your opinion, please unsubscibe from the list. There's enough negavitiy swirling around the world as it it. David -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF BLOB to Email
Most PHP folks have this image that since its so shiny its just the best which in fact is the opposite: the nice graphic designers that skin PHP projects do very well (images/css/html which are all independant of PHP), but its like dressing up a turd in silk, its still crap underneath :) A bit indelicate for posting to a PHP list, don't you think? If that's your Not if there is a better solution for what he's asking how to do :) (Q: how do I get a nail driven in with a wrench A: use a hammer) opinion, please unsubscibe from the list. There's enough negavitiy swirling around the world as it it. I do understand how a PHP list would be offended by negative comments about PHP and I apologize. However the fact remains, that the principles I stated are very true and using PHP for anything but the simplest tasks (unless you have a dedicated server with one admin user and one normal user (IE one website), tops, to run your major app on) is a really really bad idea and its starting to bite people. No offence all :) I love everyone and I wish the best in all your programming endevors. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF BLOB to Email
On May 11, 2006, at 10:51 AM, JupiterHost.Net wrote: Most PHP folks have this image that since its so shiny its just the best which in fact is the opposite: the nice graphic designers that skin PHP projects do very well (images/css/html which are all independant of PHP), but its like dressing up a turd in silk, its still crap underneath :) A bit indelicate for posting to a PHP list, don't you think? If that's your Not if there is a better solution for what he's asking how to do :) (Q: how do I get a nail driven in with a wrench A: use a hammer) opinion, please unsubscibe from the list. There's enough negavitiy swirling around the world as it it. I do understand how a PHP list would be offended by negative comments about PHP and I apologize. However the fact remains, that the principles I stated are very true and using PHP for anything but the simplest tasks (unless you have a dedicated server with one admin user and one normal user (IE one website), tops, to run your major app on) is a really really bad idea and its starting to bite people. I think you're confusing php (the language) with bad programming practices (the developers). They aren't the same. No offence all :) I love everyone and I wish the best in all your programming endevors. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF BLOB to Email
I think you're confusing php (the language) with bad programming practices (the developers). They aren't the same. A true enough statement, except what i am referring to is that PHP (the language) lends itself to bad practice and has extremely bad security issues (example: your config info is usually in world readable files so *anyone* can get your database connection info and have there way with your data) and has general unnecessary administration concerns (to add support for the simplest thing can break apache or PHP for the entire server, yeah yeah PECL, PEAR, etc whatever, they're crap). Or why not just touch ~/php.ini and all your secure php.ini settings are turned right off (yeah yeah until you do Zend Optimizer's php.ini, but again more bloat for your buck) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF BLOB to Email
I think you're confusing php (the language) with bad programming practices (the developers). They aren't the same. A true enough statement, except what i am referring to is that PHP (the language) lends itself to bad practice and has extremely bad security issues (example: your config info is usually in world readable files so *anyone* can get your database connection info and have there way with your data) and has general unnecessary administration concerns (to add support for the simplest thing can break apache or PHP for the entire server, yeah yeah PECL, PEAR, etc whatever, they're crap). Or why not just touch ~/php.ini and all your secure php.ini settings are turned right off (yeah yeah until you do Zend Optimizer's php.ini, but again more bloat for your buck) At the risk of extending empathy where none is given, perhaps you should tell us what experiences have led to your negativism. You've been a subscriber to this list for quite a while, and as far as I can remember, your posts have never been critical of the language. Surely something must have happened... David -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF BLOB to Email
At the risk of extending empathy where none is given, perhaps you should I do appreciate that thanks :) tell us what experiences have led to your negativism. You've been a subscriber to this list for quite a while, and as far as I can remember, your posts have never been critical of the language. Surely something must have happened... Well, its a long story, actually many ;p I'll break it up in categories and summarize, and I will attempt to be more positive ;p a) development: - no structure, no CPAN - random DB funtionality different combinations of --with-mysql --with-mysqli on versions 4.x and 5.x all behave differently and take different args - likely to not run the same on the same server = More expensive to develop and maintain b) resources: - php *has* to run under apache and optional optomizers because its s huge and hoggy = more expensive to run c) administration: - add simple foo funtionality you might break apache and you may break all PHP scripts - more support for end user since the user's script that worked on the last server doesn't work on this one (which takes back to the simple functionality adding bit above) = more expensive to operate d) security: - config files are generally world readable (IE anyone on the server can get to your authentication info and have complete access to your data) - directories are generally world writable (IE people ahve uploaded ISOs and stolen bandwidth from other accounts) - php.ini can be overridden so its pointless - I've seen root kits and other malciouse stuff uploaded to protected places via the web (IE phpbb patch google attack) - SQL injections and other input attacks because some feature is assumed to be on when it isn;t so the protection never gets applied = much more expensive (lost customers, time, etc) yes you can have this with any langauge given a bad programmer but with PHP you have an inherently flawed system that can unexpected overcome a good programmer. The thing that raaallly irks me is that the general vibe is: PHP looks nice so it must be nice when its simply good graphic design covering many hidden dangers and all funtionality and more can be had easier and without all the fuss with so many other technologies -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF BLOB to Email
I'd say a lot of it has to do with poor hosting configuration. But any language that has evolved as much as PHP over the last few years will have its issues... take .net, same shit happens there too...whether you want to compare asp.net to classic asp or vb.net with vb6much functionality changed and much of it not backwards compatible. my 2 cents, Bastien From: JupiterHost.Net [EMAIL PROTECTED] To: php-db@lists.php.net Subject: Re: [PHP-DB] PDF BLOB to Email Date: Thu, 11 May 2006 17:59:15 -0500 At the risk of extending empathy where none is given, perhaps you should I do appreciate that thanks :) tell us what experiences have led to your negativism. You've been a subscriber to this list for quite a while, and as far as I can remember, your posts have never been critical of the language. Surely something must have happened... Well, its a long story, actually many ;p I'll break it up in categories and summarize, and I will attempt to be more positive ;p a) development: - no structure, no CPAN - random DB funtionality different combinations of --with-mysql --with-mysqli on versions 4.x and 5.x all behave differently and take different args - likely to not run the same on the same server = More expensive to develop and maintain b) resources: - php *has* to run under apache and optional optomizers because its s huge and hoggy = more expensive to run c) administration: - add simple foo funtionality you might break apache and you may break all PHP scripts - more support for end user since the user's script that worked on the last server doesn't work on this one (which takes back to the simple functionality adding bit above) = more expensive to operate d) security: - config files are generally world readable (IE anyone on the server can get to your authentication info and have complete access to your data) - directories are generally world writable (IE people ahve uploaded ISOs and stolen bandwidth from other accounts) - php.ini can be overridden so its pointless - I've seen root kits and other malciouse stuff uploaded to protected places via the web (IE phpbb patch google attack) - SQL injections and other input attacks because some feature is assumed to be on when it isn;t so the protection never gets applied = much more expensive (lost customers, time, etc) yes you can have this with any langauge given a bad programmer but with PHP you have an inherently flawed system that can unexpected overcome a good programmer. The thing that raaallly irks me is that the general vibe is: PHP looks nice so it must be nice when its simply good graphic design covering many hidden dangers and all funtionality and more can be had easier and without all the fuss with so many other technologies -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] PDF generation on the fly
www.fpdf.org bastien From: Adrian Bruce [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] PDF generation on the fly Date: Mon, 23 Jan 2006 15:31:48 + Hi Do any of you use pdflib for generating PDF files on the fly? Ive got the demo working and it looks good so far, i was expecting it be open source but found out that it has a price tag of 450 euros per processor, this is fairly reasonable of course but i was wandering if anyone knew of any alternatives (prefereably open source) out there that do a similar thing. Thanks Ade -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF generation on the fly
thanks a lot, i'll take a look at it Bastien Koert wrote: www.fpdf.org bastien From: Adrian Bruce [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] PDF generation on the fly Date: Mon, 23 Jan 2006 15:31:48 + Hi Do any of you use pdflib for generating PDF files on the fly? Ive got the demo working and it looks good so far, i was expecting it be open source but found out that it has a price tag of 450 euros per processor, this is fairly reasonable of course but i was wandering if anyone knew of any alternatives (prefereably open source) out there that do a similar thing. Thanks Ade -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF generation on the fly
Do any of you use pdflib for generating PDF files on the fly? Ive got the demo working and it looks good so far, i was expecting it be open source but found out that it has a price tag of 450 euros per processor, this is fairly reasonable of course but i was wandering if anyone knew of any alternatives (prefereably open source) out there that do a similar thing. http://www.ros.co.nz/pdf/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] PDF encoded
http://ca3.php.net/manual/en/function.base64-decode.php bastien From: Shekhar Juneja [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] PDF encoded Date: Tue, 12 Jul 2005 14:30:32 +0100 Hi , I am trying to figure out a way how to display base64 encoded string. Basically I am getting base64 encoded string back a webservise, I was to display this PDF inlined in the browser. But instead its printing the encoded string in the browser. request help on this:) Warm regards Shekhar -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] PDF encoded
Hi Bastien. Snippet of my code is header('Content-type: application/pdf'); header( Content-Disposition: inline); header('Content-Transfer-Encoding: base64'); echo echo base64_decode€($String); Where $string contains the encoded string. Don’t know where I am going wrong. Regards Shekhar -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 3:06 PM To: [EMAIL PROTECTED]; php-db@lists.php.net Subject: RE: [PHP-DB] PDF encoded http://ca3.php.net/manual/en/function.base64-decode.php bastien From: Shekhar Juneja [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] PDF encoded Date: Tue, 12 Jul 2005 14:30:32 +0100 Hi , I am trying to figure out a way how to display base64 encoded string. Basically I am getting base64 encoded string back a webservise, I was to display this PDF inlined in the browser. But instead its printing the encoded string in the browser. request help on this:) Warm regards Shekhar -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF encoded
Looks like you're telling the browser that the data is base64, and then decoding the data before you send it. Try sending the string without the base64_decode() statement. just echo $string Or, lose the transfer encoding header, and leave the base64_decode() in.. -Micah On Tuesday 12 July 2005 7:56 am, Shekhar Juneja wrote: Hi Bastien. Snippet of my code is header('Content-type: application/pdf'); header( Content-Disposition: inline); header('Content-Transfer-Encoding: base64'); echo echo base64_decode€($String); Where $string contains the encoded string. Don’t know where I am going wrong. Regards Shekhar -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 3:06 PM To: [EMAIL PROTECTED]; php-db@lists.php.net Subject: RE: [PHP-DB] PDF encoded http://ca3.php.net/manual/en/function.base64-decode.php bastien From: Shekhar Juneja [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] PDF encoded Date: Tue, 12 Jul 2005 14:30:32 +0100 Hi , I am trying to figure out a way how to display base64 encoded string. Basically I am getting base64 encoded string back a webservise, I was to display this PDF inlined in the browser. But instead its printing the encoded string in the browser. request help on this:) Warm regards Shekhar -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] PDF encoded
Tried both ways :( -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 5:17 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] PDF encoded Looks like you're telling the browser that the data is base64, and then decoding the data before you send it. Try sending the string without the base64_decode() statement. just echo $string Or, lose the transfer encoding header, and leave the base64_decode() in.. -Micah On Tuesday 12 July 2005 7:56 am, Shekhar Juneja wrote: Hi Bastien. Snippet of my code is header('Content-type: application/pdf'); header( Content-Disposition: inline); header('Content-Transfer-Encoding: base64'); echo echo base64_decode€($String); Where $string contains the encoded string. Don’t know where I am going wrong. Regards Shekhar -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 3:06 PM To: [EMAIL PROTECTED]; php-db@lists.php.net Subject: RE: [PHP-DB] PDF encoded http://ca3.php.net/manual/en/function.base64-decode.php bastien From: Shekhar Juneja [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] PDF encoded Date: Tue, 12 Jul 2005 14:30:32 +0100 Hi , I am trying to figure out a way how to display base64 encoded string. Basically I am getting base64 encoded string back a webservise, I was to display this PDF inlined in the browser. But instead its printing the encoded string in the browser. request help on this:) Warm regards Shekhar -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF encoded
I didn't really read your post carefully. On second read it looks like you're trying inlide embedding? So in other words, you want an HTML page with an are that is a PDF, as if you used an embed tag? If that's what you're trying, it's really flaky, and you'd be better off to save it as a .pdf file, and use the embed tag, IMHO.. -Micah On Tuesday 12 July 2005 9:39 am, Shekhar Juneja wrote: Tried both ways :( -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 5:17 PM To: php-db@lists.php.net Subject: Re: [PHP-DB] PDF encoded Looks like you're telling the browser that the data is base64, and then decoding the data before you send it. Try sending the string without the base64_decode() statement. just echo $string Or, lose the transfer encoding header, and leave the base64_decode() in.. -Micah On Tuesday 12 July 2005 7:56 am, Shekhar Juneja wrote: Hi Bastien. Snippet of my code is header('Content-type: application/pdf'); header( Content-Disposition: inline); header('Content-Transfer-Encoding: base64'); echo echo base64_decode€($String); Where $string contains the encoded string. Don’t know where I am going wrong. Regards Shekhar -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 3:06 PM To: [EMAIL PROTECTED]; php-db@lists.php.net Subject: RE: [PHP-DB] PDF encoded http://ca3.php.net/manual/en/function.base64-decode.php bastien From: Shekhar Juneja [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] PDF encoded Date: Tue, 12 Jul 2005 14:30:32 +0100 Hi , I am trying to figure out a way how to display base64 encoded string. Basically I am getting base64 encoded string back a webservise, I was to display this PDF inlined in the browser. But instead its printing the encoded string in the browser. request help on this:) Warm regards Shekhar -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] pdf
check this - Original Message - From: balwantsingh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 15, 2004 11:23 AM Subject: [PHP-DB] pdf hi all, i want to how i can save the data retrieved from mysql through php in pdf format. thanks for your help in advance. with best wishes balwant -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] pdf
www.fpdf.org bastien From: balwantsingh [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] pdf Date: Fri, 15 Oct 2004 13:53:00 +0530 hi all, i want to how i can save the data retrieved from mysql through php in pdf format. thanks for your help in advance. with best wishes balwant -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] pdf
i want to how i can save the data retrieved from mysql through php in pdf format. http://www.fpdf.org/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] pdf editor
I think someone else asked about a problem where they had text running off the side of the page, heres everything I've ever learned about PS/PDF. GNU ghostscript is all you really need for editing pdf's. Usually the text appears as plain text once you convert the PDF to a PS with pdf2ps, and you can just delete it and put it back as PDF using ps2pdf. I do quick changes like this all the time. The adobe postscript 3 driver for windows outputs clean postscript, I use it a lot for email merge with PDF cause I can't afford more expensive products. Here's some notes I made a while back on it, you may need to view my little diagrams with courier fonts: The first two parameters are the location of the text. Depending on how the text will function, you have two choices, you can either let the postscript file handle spacing, or you can use static letter spacing and if there is too much text for one line it will spill off the page. You want to use static spacing for fields, where there is no other text to space, but if you are inserting a name into the middle of a line of text, you will want to let postscript handle spacing, like this (here what I know): -2040 -1827 ( *#address1#*) -2.666595 0 725 5 16 A1`65 ^ ^ ^ ^ ^ x coord y coord text string width maximum letter spacing? If you want to do static text, simply convert this line to this, by adding a moveto after the coordinates, and chaging all the number parameters to show. -2040 -1827 moveto ( *#address1#*) show When the text runs off the right side of the page, my solution was to change the original document, and drop it down onto its own line. Its possible to program postscript to automatically add a line break when the line gets too big, I don't know postscript so don't ask me how to get this to work: . /Helvetica-Bold-SHOWISO exch definefont pop /Helvetica findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding showcaseisoencoding def currentdict end ... 31 189 M (Comments:) S /Helvetica-Bold-SHOWISO findfont 24 scalefont setfont /rule (___) def /y 189 def /x 141.336 def y -29 73 { x exch M rule S } for rule stringwidth pop 29 x y comments BreakIntoLines grestore grestore showpage This postscript is taken from the default fax coversheet file (faxcover.ps) from gnu hylafax. -Jeff - Original Message - From: matthew perry [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 9:53 AM Subject: [PHP-DB] pdf editor I use Windows XP. Really all I need to do is remove a single line in a pdf file and I can't convince myself to spend $749 for Acrobat Pro to do it. - Matt On 7 Apr 2004, at 16:34, matthew perry wrote: Does anyone know a free pdf editor? what platform do you require it for? -- Mike Karthauser Managing Director - Brightstorm Ltd Email [EMAIL PROTECTED] Web http://www.brightstorm.co.uk Tel 0117 9426653 (office) 07939 252144 (mobile) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF Implementation
Check out this page:http://www.ros.co.nz/pdf/, is a useful class and you can implement with any kind of database. Norma Ramirez Area de Desarrollo Web [EMAIL PROTECTED] - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 17, 2003 9:01 AM Subject: [PHP-DB] PDF Implementation Good Morning All , Has anyone successfully implemented PDF functionality within their PHP / MySQL projects? My needs are very basic, so I'd like to use something like ezPDF creation to avoid buying a license. But I haven't yet got ezPDF to work correctly. Set up is Win2k, PHP 4.3.2, Apache 1.3.24, MySQL 4.0.13. Specifics are much appreciated. Thanks, David -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF Implementation
On Thu, 17 Jul 2003 09:01:53 -0500 [EMAIL PROTECTED] wrote: Good Morning All , Has anyone successfully implemented PDF functionality within their PHP / MySQL projects? My needs are very basic, so I'd like to use something like ezPDF creation to avoid buying a license. But I haven't yet got ezPDF to work correctly. Set up is Win2k, PHP 4.3.2, Apache 1.3.24, MySQL 4.0.13. A very good pure php PDF generator is FPDF. The scripts section has some samples using a DB as input. http://www.fpdf.org/ hth pierre -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF
On Monday, July 8, 2002, at 06:50 PM, Natividad Castro wrote: Hi to all, How can I display info in a PDF? All I need is to be able to read from a table and display fields into a PDF. Before, I had my DB in Microsoft Access, so I bounded all the fields in a report and then I converted it into PDF document. But now that we switch to MySQL, I don't know how to generate those PDFs. I've been reading about FDF, but I still I little bit confused. If someone has any idea, please let me know There have been a couple of articles about this on www.phpbuilder.com, check them out. They should give you a start at least. -e -- egil helland / it consultant (mcse, web technology) web: ikon.as / egil.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF
Natividad Castro said: Hi to all, How can I display info in a PDF? All I need is to be able to read from a table and display fields into a PDF. Before, I had my DB in Microsoft Access, so I bounded all the fields in a report and then I converted it into PDF document. But now that we switch to MySQL, I don't know how to generate those PDFs. I've been reading about FDF, but I still I little bit confused. If someone has any idea, please let me know I would strongly suggest that you use a PDF class of some sort. There're quite a few available. I've had good results with pc4p. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF
If someone has any idea, please let me know I would strongly suggest that you use a PDF class of some sort. There're quite a few available. I've had good results with pc4p. Typically, most PDF classes require that it be working from some sort of static template. If that is fine, then definitely check out any of the PDF classes out there. If you can't use a static template, check out an app called htmldoc. I use it here with great success. Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDF/FDF Support
on 7/2/02 8:20 PM, Jefferson Cowart at [EMAIL PROTECTED] appended the following bits to my mbox: I'm trying to write a PDF form that people can fill in. I want to then take the data, store it in my database, and then recall the data, and display a filled in form with that data. I see two options. The first is to have acrobat post the entire PDF file and store the entire file. This option seems to be to be a little bit of a waste as much of the data is the same (the form). The second option is to have it post FDF data and then later turn that around and put it back into a form for people to view. Does anyone know of any good documentation on how to do this with PDF files, PHP, and a DB backend? The most accessible solution is to generate the PDF file with all of the data filled in as text in the PDF. That way, programs other than Acrobat Reader can view the PDF file. If you have your PHP module compiled with FDF support, you can read this page for more info: http://www.php.net/manual/en/ref.fdf.php If you don't have that, it is fairly straightforward to make an FDF document by hand with PHP. I put up a sample at: http://www.burney.ws/misc/fdf-sample.phps Basically, though, you want to do the following: 1) Use Acrobat to create the PDF fill in document, using reasonable variable names (probably your database field names) 2) Write a PHP file that does something like: - Output the correct FDF header - Output the standard beginning FDF stuff - Put the database data into the the /T and /V fields - Set the /F value as the URL of your pdf fill-in. - Output the standard ending FDF stuff Caveats: Acrobat Reader must be installed as a web plugin (i.e., opening the document in the browser) and it must be set to handle the FDF type. This may be the default case in Windows, but I know from experience that it is a PITA on old Macs. Hope that helps. Sincerely, Paul Burney http://paulburney.com/ ?php while ($self != asleep) { $sheep_count++; } ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php