User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion

Reply
Thread Tools Display Modes
Unread 1 Jun 2005, 09:18   #1
Zword
more then you can ever be
 
Zword's Avatar
 
Join Date: May 2002
Location: Some far away landy thingy
Posts: 507
Zword is infamous around these partsZword is infamous around these partsZword is infamous around these partsZword is infamous around these partsZword is infamous around these partsZword is infamous around these parts
write from php to pdf

Right, as you might have seen from the title I've got this little problem. I"ve got a filled in form. with some data in it. When I hit the submit button I want the data to be writen to a pdf file so that the user can either save or print it. I've googled for several hours now but came up with either a program that I must pay for or some shitty code that doesn't work.

Does any one of you smart ass b*tches got the solution to my tiny little problem?
__________________
(20:55:52) (@w2k) if registrations are disabled how did spinner sign up :\
(20:56:29) (@w2k) spinner isnt cool anymore

(06:41:50) (Shai-gar) Add meaple to Your Ignore List
(06:42:00) (Ghosteh) why?
(06:42:24) (Shai-gar) i dislike the ****
(06:42:37) (Ghosteh) heh

/me likes meaple <3
Zword is offline   Reply With Quote
Unread 1 Jun 2005, 09:25   #2
Wandows
[Vision]
 
Wandows's Avatar
 
Join Date: Jul 2001
Location: The Netherlands
Posts: 897
Wandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond reputeWandows has a reputation beyond repute
Re: write from php to pdf

FOP

don't ask me about the details as i don't know how it exactly works, i just know some ppl have been using it succesfully to build pdf files in combination with php (Ican't reach apache.org for the docs, but try and search some search engine on FOP / pdf )
__________________
[Vision] in a lost dream, contributing to The 5th Element at present
Wandows is offline   Reply With Quote
Unread 1 Jun 2005, 09:58   #3
wu_trax
Registered User
 
Join Date: Jan 2003
Posts: 4,290
wu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet society
Re: write from php to pdf

its too slow.
first you need to transform whatever you want to write into xml-data. when you are done with that you write that xml-data into a file.
then you need an XSL-FO-file to transform your xml-data in to that XML:FO or whatever it is called.
when you are done with that you can call fop on the command-line. that gives you a pdf-file on the file-system, so you need to open it, read its content and stream it to the browser. afterwards you can delete the XML- and PDF-files.
as you can see there isa lot of action on the file-system-level and that makes it very slow. maybe there is a better way, but as far as i know FOP always wants to write something into a file.
__________________
im not tolerant, i just dont care.
wu_trax is offline   Reply With Quote
Unread 1 Jun 2005, 14:59   #4
Mit
Let battle commence
 
Mit's Avatar
 
Join Date: Feb 2002
Location: England
Posts: 732
Mit is a jewel in the roughMit is a jewel in the roughMit is a jewel in the rough
Re: write from php to pdf

http://www.phpbuilder.com/columns/perugini20001026.php3

I tried PDFLib, decided it was a pain and gave up

http://www.google.co.uk/search?q=PHP...-US:unofficial
__________________
Mit
http://tim.igoe.me.uk - Development Blog
Whats on TV now - UK TV Guide

<Mendosa> mit is a cute cudlly toy that will be in the shops by christmas
<mig-work> ur now my eternal fav pa god
<Squiz> i name thee, Sir Mit
<Zeus> u my friend are a true gamer I knew u were
Mit is offline   Reply With Quote
Unread 1 Jun 2005, 15:25   #5
wu_trax
Registered User
 
Join Date: Jan 2003
Posts: 4,290
wu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet society
Re: write from php to pdf

as i already said in the other thread in GD ezpdf is nice and easy to use (if you dont want to do anything too complicated)
http://www.ros.co.nz/pdf/

just include some php-file and thats it.
__________________
im not tolerant, i just dont care.
wu_trax is offline   Reply With Quote
Unread 1 Jun 2005, 20:38   #6
JetLinus
Friendly geek of GD :-/
 
JetLinus's Avatar
 
Join Date: Nov 2000
Location: On my metal roid
Posts: 923
JetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud ofJetLinus has much to be proud of
Arrow Re: write from php to pdf

I've read on a very good German page about Visual Basic about creating PDF in pure VB. They're going step by step, first text, then elements, pictures, compression...

I know it's useless, but I'm just copy pasting some german rubbish here now:
Code:
PDF-Header (allgemeine Infos, definiert u.a. Zeichensatz) 
PDF-Stream: 
Seite 1: 
Page-Header (allgemeine Seiteninfos) 
Page-Stream (Inhalt einer Seite) 
Page-Trailer (u.a. Länge der Seite in Bytes) 
Seite 2: 
Page-Header 
Page-Stream 
Page-Trailer 
Seite ... 
PDF-Trailer (enthält Seitenzahl, Seiten-Referenzen, Liste aller Objekte)
Maybe that's a way for you too? Create the PDF from scratch? That must be a HELL of a lot of work, I know -- So maybe someone else has done it already?
You're sure there is no "php2pdf" or something like "createPDF.php" around?
__________________
[»] Entropy increases! :-/
JetLinus is offline   Reply With Quote
Unread 2 Jun 2005, 09:36   #7
wu_trax
Registered User
 
Join Date: Jan 2003
Posts: 4,290
wu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet societywu_trax is a pillar of this Internet society
Re: write from php to pdf

i feel ignored
__________________
im not tolerant, i just dont care.
wu_trax is offline   Reply With Quote
Unread 2 Jun 2005, 09:44   #8
hyfe
Dum Di Dum Di
 
Join Date: Sep 2001
Posts: 858
hyfe is a pillar of this Internet societyhyfe is a pillar of this Internet societyhyfe is a pillar of this Internet societyhyfe is a pillar of this Internet societyhyfe is a pillar of this Internet societyhyfe is a pillar of this Internet societyhyfe is a pillar of this Internet societyhyfe is a pillar of this Internet societyhyfe is a pillar of this Internet societyhyfe is a pillar of this Internet societyhyfe is a pillar of this Internet society
Re: write from php to pdf

if it makes you feel any better wu_trax, that link went straight into my 'damn usefull stuff' collection
__________________
Ni! M00!
my boring homepage
hyfe is offline   Reply With Quote
Unread 5 Jun 2005, 00:08   #9
Thermodynamics
Powering your life...
 
Join Date: Dec 2004
Location: Dublin
Posts: 400
Thermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to behold
Re: write from php to pdf

Ok, I actually know faaaaaaar more about hardware/OS's etc. than this sort of thing, but I would strongly reccomend www.openoffice.org , dwnld the beta of open office 2.0 and give it a go. Versions for Linux etc., has a very useful export to pdf function...
__________________
Reality is only a perception.
Thermodynamics is offline   Reply With Quote
Unread 5 Jun 2005, 00:32   #10
Mit
Let battle commence
 
Mit's Avatar
 
Join Date: Feb 2002
Location: England
Posts: 732
Mit is a jewel in the roughMit is a jewel in the roughMit is a jewel in the rough
Re: write from php to pdf

As the title suggests, its converting from a PHP script to a PDF - not a normal office document. But yes, the OOo PDF exporter is good at normal office docs to PDF.
__________________
Mit
http://tim.igoe.me.uk - Development Blog
Whats on TV now - UK TV Guide

<Mendosa> mit is a cute cudlly toy that will be in the shops by christmas
<mig-work> ur now my eternal fav pa god
<Squiz> i name thee, Sir Mit
<Zeus> u my friend are a true gamer I knew u were
Mit is offline   Reply With Quote
Unread 5 Jun 2005, 21:12   #11
Thermodynamics
Powering your life...
 
Join Date: Dec 2004
Location: Dublin
Posts: 400
Thermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to behold
Re: write from php to pdf

Quote:
Originally Posted by Mit
As the title suggests, its converting from a PHP script to a PDF - not a normal office document. But yes, the OOo PDF exporter is good at normal office docs to PDF.
Well actually I had a little bit of tinkering in mind... If it can be printed, do so, scan it, save in picture format, jpg. etc., and open with Open Office- and export as .pdf! Bit complicated but its all I can think of!
__________________
Reality is only a perception.
Thermodynamics is offline   Reply With Quote
Unread 5 Jun 2005, 22:07   #12
Mit
Let battle commence
 
Mit's Avatar
 
Join Date: Feb 2002
Location: England
Posts: 732
Mit is a jewel in the roughMit is a jewel in the roughMit is a jewel in the rough
Re: write from php to pdf

Quote:
Originally Posted by Thermodynamics
Well actually I had a little bit of tinkering in mind... If it can be printed, do so, scan it, save in picture format, jpg. etc., and open with Open Office- and export as .pdf! Bit complicated but its all I can think of!
Hardly useful for a 'pdf exporter' for a dynamic web page. Can't get your users doing that - for one, that'd require a LOT downloading OOo (which isn't going to happen)
__________________
Mit
http://tim.igoe.me.uk - Development Blog
Whats on TV now - UK TV Guide

<Mendosa> mit is a cute cudlly toy that will be in the shops by christmas
<mig-work> ur now my eternal fav pa god
<Squiz> i name thee, Sir Mit
<Zeus> u my friend are a true gamer I knew u were
Mit is offline   Reply With Quote
Unread 5 Jun 2005, 22:16   #13
Thermodynamics
Powering your life...
 
Join Date: Dec 2004
Location: Dublin
Posts: 400
Thermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to beholdThermodynamics is a splendid one to behold
Re: write from php to pdf

Looks like i lost the thread somewhere! sorry! I thought he wanted a blank form for ppl to dwnld? in .pdf form? Or he filled one out and wanted to send it as .pdf? no matter- he seems to have solved it anyway...
__________________
Reality is only a perception.
Thermodynamics is offline   Reply With Quote
Unread 12 Jun 2005, 15:24   #14
GReaper
The BOFH
 
GReaper's Avatar
 
Join Date: Mar 2001
Posts: 463
GReaper has a brilliant futureGReaper has a brilliant futureGReaper has a brilliant futureGReaper has a brilliant futureGReaper has a brilliant futureGReaper has a brilliant futureGReaper has a brilliant futureGReaper has a brilliant futureGReaper has a brilliant futureGReaper has a brilliant futureGReaper has a brilliant future
Re: write from php to pdf

How about PDML? You could always use FPDF (which is what PDML relies on) to generate your own PDFs.
GReaper is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Forum Jump


All times are GMT +1. The time now is 07:41.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018