Creating and returning a pdf

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating and returning a pdf

Marco D'Ambros
Hi,

in my application I want that when a user clicks on a submit button he/
she gets back a pdf file.
The problem is that this pdf file should be generated at the same  
time, i.e. when the user click the same button.

How can I do that?

thanks and cheers
Marco
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Creating and returning a pdf

Lukas Renggli
> How can I do that?

Did you check <http://www.seaside.st/documentation/pdfs>?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Creating and returning a pdf

Marco D'Ambros
Yes, but the problem is not really about pdf, but about creating a  
file and proving the url to that file in the same callback.
Something like this, but working ;)

        html submitButton
                onClick: (html request callback: [self generateFile]);
                url: <link to the generated file>


cheers
Marco

On May 14, 2009, at 11:54 PM, Lukas Renggli wrote:

>> How can I do that?
>
> Did you check <http://www.seaside.st/documentation/pdfs>?
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Creating and returning a pdf

Marco D'Ambros
oops, the information was actually there, but under PDFReactor which I  
initially skipped :-)
What I was looking for was this:

html submitButton on: #generateAndExport of: self

generateAndExport
        self generatePdf.
        aFile := pdfFile readStream
        aFile binary.
        contents := aFile contents.
        aFile close.

        self session returnResponse: (WAResponse
                document: contents
                mimeType: 'application/pdf'
                fileName: pdfFile).


cheers
Marco


On May 15, 2009, at 12:33 AM, Marco D'Ambros wrote:

> Yes, but the problem is not really about pdf, but about creating a
> file and proving the url to that file in the same callback.
> Something like this, but working ;)
>
> html submitButton
> onClick: (html request callback: [self generateFile]);
> url: <link to the generated file>
>
>
> cheers
> Marco
>
> On May 14, 2009, at 11:54 PM, Lukas Renggli wrote:
>
>>> How can I do that?
>>
>> Did you check <http://www.seaside.st/documentation/pdfs>?
>>
>> Lukas
>>
>> --
>> Lukas Renggli
>> http://www.lukas-renggli.ch
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Seaside site and documentation

Liliana-2
In reply to this post by Lukas Renggli

Hi Lukas

I'd like to congratulate you -and everybody else who contributed- for a very good web site and documentation; lits of blogs etc.
It's excellent.
Liliana
www.finworks.biz

On Thu, 2009-05-14 at 23:54 +0200, Lukas Renggli wrote:
> How can I do that?

Did you check <http://www.seaside.st/documentation/pdfs>?

Lukas


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside site and documentation

Lukas Renggli
Thank you.

This is only possible with the help of the community that provides
text that we can include, links that we can add and issues they
discover.

Cheers,
Lukas

On Fri, May 15, 2009 at 9:40 AM, Liliana Ivan <[hidden email]> wrote:

>
> Hi Lukas
>
> I'd like to congratulate you -and everybody else who contributed- for a very
> good web site and documentation; lits of blogs etc.
> It's excellent.
> Liliana
> www.finworks.biz
>
> On Thu, 2009-05-14 at 23:54 +0200, Lukas Renggli wrote:
>
>> How can I do that?
>
> Did you check <http://www.seaside.st/documentation/pdfs>?
>
> Lukas
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>



--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside