one novel way to utilise was a link like this to call the cgi. oh I am
assuming encoding is automatic in this module like redirect?
<insert href="http://domain/locationof_pdf.php?formdata_id=&form.id;"/>
saves a file to a configured location from which a user can
subsequently download from... send a key with link pointing at the file
to the user, rather than attaching it...
This is also a novel way of requesting xml packet returns... using
whatever defines are required to strip.
I do need a better way to separate design from data and send to
postscript/PDF ... -> so, interested if anyone else has any pdflib
experience. Overlaying separation and joining, mixing - rxml containers
even... see the fpdf <pdml></pdml>
Greetings
Matt
webhaven
Peter_Jönsson wrote:
> _roxen
> Hej,
>
> Just took a short look and indeed as you say it is not possible to
> return any headers directly from the php script (it is the server
> that sets the headers and the cgi-php output is just a part or the
> whole of the page contents). Using php in Roxen (or anywhere :) is
> not really my cup of tea but what you could do is to return rxml
> <header>-tags instead and let the roxen cgi-module rxml-parse the
> output from php and in this way set the headers and return the pdf-
> contents. This is of course assuming that you run php as a cgi...
>
> In practice (example):
> Replace header('Content-Type: application/pdf')
> with echo('<header name="Content-Type" value="application/pdf'"/>')
> in the php script and have the cgi-module set to rxml-parse the
> returned cgi-contents. Fingers crossed- not tested ;)
>
> Another and perhabs better solution is to let the Output function
> save the pdf as a regular file and return the path to a webpage and
> either create a normal link to the file or redirect to a page that
> fetches the pdf and returns it to the client.
>
> It is not exactly clear what behavior you want from your app and
> where in the process you get the error but I hope this can help
> somewhat. Please let us know if you have any progress
>
> //peter
>
>
>
>
> On 26 nov 2006, at 17.16, Magnus Andersson wrote:
>
>> Mitt namn är Magnus Andersson och jag är med och är ansvarig för
>> hemsidan till D-sektionen på Linköping universitet.
>> Vi har ett problem med att använda PHP tillsammans med roxen som vi
>> inte lyckats lösa och vi har provat det mesta.
>> Problemet är att det itne går att skicka Content-Type från php,
>> det är
>> så att jag ska skapa en dynamisk PDF i PHP och behöver då skicka en
>> content-type till webbläsaren, och nu går inte det så det blir
>> script-error när jag går in på sidan.
>>
>> Blev tipsad om denna mailinglista så jag ger den ett försök,
>> bifogar koden så ni ser hur det ser ut.
>> Går att fixa?
>> <fpdf.php>
>> <generate_pdf.php>
>
|