Depending on your purpose, you may wish to use @include instead of a read 
file action. this has the usual advantages (speed) and disadvantages (cache 
purging) as other @include uses. It also uses server memory, so if you have 
100 GB of PDFs, you'll want to use the read file action. If you're serving 
a single 10KB PDF 100,000 times, the @include is better. Robert

----------------------------------------

From: "Ben Johansen" <[email protected]>
Sent: Monday, April 06, 2009 5:59 PM
To: [email protected]
Subject: Re: Witango-Talk: Dynamically display PDF files 

read the pdf in, in a file action

then create a resultset

<pre>
<@purgeresults><<@assign local$httpHeader "HTTP/1.1 200 
OK<@crlf>MIME-Version: 1.0<@crlf>Content-Type: 
application/pdf<@CRLF><@CRLF><@var <read in pdf var>

</pre>

like this

On Apr 6, 2009, at 2:42 PM, Stefan Gonick wrote:

Hey Everybody,

I have a folder of pdf files and a database containing the names of those 
files.
Does anyone know how to dynamically display a pdf file after looking up 
its
name in the database?

Thanks,
Stefan

Still hoping to hear about version 6...

=====================================================
Database WebWorks: Dynamic web sites through database integration
http://www.DatabaseWebWorks.com

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Ben Johansen
http://www.webspinr.com
[email protected]
Phone: 360-597-3372
Mobile: 360-600-7775

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

 

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to