[Seaside] Re: View PDF in browser

Torsten Bergmann astares at gmx.de
Mon Dec 19 19:59:12 UTC 2011


Hi Bob,

attached is an example that works for me (Seaside 3.0.6 in Pharo 1.3).

Point your browser to

   http://localhost:8080/pdfexample

There are two examples:

If you want to host the PDF file within a custom file library
look at PDFExRootComponent>>respondWithPDF

For the second example (hosting the PDF on hard disk)
just put the attached helloworld.pdf into c:\temp\ or adopt the
files location in PDFExRootComponent>>respondWithPDFFromFile.

Both of them open directly within the browser (tried with
Chrome and IE) in conjunction with Adobe Reader.

Bye
T.



-------- Original-Nachricht --------
> Datum: Mon, 19 Dec 2011 04:29:41 -0800 (PST)
> Von: bobn at rogers.com
> An: Torsten Bergmann <astares at gmx.de>
> Betreff: Re: View PDF in browser

> Torsten,
> > In Adobe there is a setting to 'Display PDF in browser'
> That is indeed how I have my browser configured. If the link is to a PDF
> file, it does get displayed in the browser. 
> 
> So...
> html anchor url: TSwaFileLibrary / #TestReportPdf; with: 'PDF Report
> File'. 
> 
> ...is displayed in the browser, but...
> html anchor callback: [self pdfReport]; with: 'PDF Report Build'. 
> 
> ...triggers a PDF file download.
> 
> I'm looking for a way to trigger the 'in browser' PDF display for
> generated PDF files served from Seaside, a way to have browser see the link as a
> PDF document.
> 
> Bob
> 
> 
> ________________________________
>  From: Torsten Bergmann <astares at gmx.de>
> To: seaside at lists.squeakfoundation.org 
> Cc: bobn at rogers.com 
> Sent: Monday, December 19, 2011 6:39:18 AM
> Subject: Re: View PDF in browser
>  
> Bob Nemec wrote:
> >but not the question of how get the browser to view the PDF without
> >launching a reader app for browsers
> 
> Hi Bob,
> 
> This is not a server issue. It's a client setting.
> 
> In Adobe there is a setting to 'Display PDF in browser', somewhere in the
> preferences. I think it is edit | preferences. Click on internet on the
> left then display pdf in browser on the right.
> 
> Bye
> Torsten
> 
> 
> -- 
> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: helloworld.pdf
Type: application/pdf
Size: 8516 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20111219/ec5040c4/helloworld-0001.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PDF-Download-Example.st
Type: application/octet-stream
Size: 30207 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20111219/ec5040c4/PDF-Download-Example-0001.obj


More information about the seaside mailing list