Hello Paul, Thanks for the response. Troy is also helping me with this. I tried your code but on both Netscape or i.e. 5.0 I get HTTP Error 404 "The Web serve cannot find the file or script you asked for.............................." I turn location=yes and this is the url passed: http://md.mdenterprises.net/Tango3/VFIMdrBASE/ShwPDF.taf/MannyIIJ.PDF?docid=MannyIIJ.PDF&_UserReference=36C9F07CA14103673B1D77D8 In a search search action object I can pull in the my varchar column that has the PDF document, but you mentioned to put the column value into LOCAL$lvPDF variable in the search action. If I right click in the "select column" of the search action and choose insert meta tag and create the variable in that manner then the column is not pulled into the search action. How do you do this? Any help is very much appreciated, Manuel pdbordine wrote: > Manuel, > > This is exactly how we present confidential reports to our clients. The PDF > is stored in a VARCHAR column, and dynamically delivered to the client > without writing a file to the server drive. The technique prohibits > bookmarking of a location, and insures that the user is properly > authenticated. > > Use a Search action to select the varchar into a local Tango variable (named > LOCAL$lvPDF in the example below), then use the following code in a results > action (this is Tango 2000 only): > > <@ASSIGN LOCAL$fileName VALUE="YourFilenameHere.pdf"> > > <@PURGERESULTS><@EXCLUDE> > <@ASSIGN LOCAL$encodeResults VALUE=FALSE> > <@ASSIGN local$httpHeader VALUE="Content-Type: > application/pdf<@CRLF><@CRLF>"> > </@EXCLUDE><@VAR LOCAL$lvPDF ENCODING=NONE> > > There are some very important gotchas: > > There can be no push attributes in the taf file before the local$httpHeader > variable is set. Sending any data before the httpHeader variable is set will > cause Tango to issue the default header, resulting in the client receiving > your document as plain HTML. In other words, once the http header has been > sent from Tango, it cannot be changed. > > There can be no data at all, including white space, before or after the > expression of the varchar variable. Any stray characters will be appended to > the data stream sent to the client, resulting in corruption the PDF file > structure. That is why the @purgeresults and @exclude tags are so important. > Do not put any carriage returns after the /@exclude tag. This includes all > of the taf file that executes, before or after this results action. > > Finally, you have to trick MSIE into believing that it is actually reading a > file. It seems to give preference to the path of the file over the http > header. Fortunately this is easy: It turns out that IIS, Apache, and maybe > all http servers read a URL left to right. So you can create a seemingly > bogus url such as: > > http://www.coffeylabs.com/taf/reports/privatereports.taf/YourFilenameHere.pd > f?argument1=value1&argument2=etc > > Notice that I put a "/YourFilenameHere.pdf after the .taf! The server will > ignore the junk after /privatereports.taf until it reads the ?, and then it > will capture the arguments as usual. The client browser will not. Instead, > the browser will read /YourFilenameHere.pdf as the end of the path, and > correctly initiate a file download. > > Note that this technique works equally well for other file types such as > Excel. We have some very happy clients because they have access to Excel > formatted data in real time. > > Good Luck, > Paul > > > I been working on a dynamic PDF generation system can can utilize RBase > > report designer. I got the system working and now I can deploy dynamic > > RBase/PDF reports. The problem I encountered is that if the new PDF > > report has a name of a report previously viewed by the user, the > > browser shows the old report unless a browser refresh is issued. Of > > course, we can change the browser's setting to refresh every time and > > not use the cache but this would slow down the system. > > The solution that I am exploring is generating the PDF report and > > loading it into a VARCHAR column that Tango can Query and display > > directly. This would be similar as displaying a VARBIT picture image > > stored in a column. > > > > Is there a way to display a VARCHAR column that contains a PDF file as a > > PDF document? > > > > Thanks In Advance for your help, > > Manuel > >
begin:vcard n:de Aguiar;Manuel tel;fax:(323)661-7698 tel;work:(323)660-3511 x-mozilla-html:FALSE url:http://www.mdenterprises.net org:M|D Enterprises adr:;;2412 No. Commonwealth Avenue;Los Angeles;California;90027-1206;USA version:2.1 email;internet:[EMAIL PROTECTED] title:Developer note;quoted-printable:The information contained in this e-mail may be privileged, confidential,=0D=0Aand protected from disclosure. If you are not the intended recipient, you=0D=0Aare hereby notified that any dissemination, distribution or duplication of=0D=0Athis communication is strictly prohibited. If you have received this=0D=0Acommunication in error, please notify the sender immediately and delete all=0D=0Acopies.=0D=0A=0D=0Ahttp://www.mdenterprises.net=0D=0Ahttp:/www.databasedeveloper.com=0D=0Ahttp://www.MdrBASE.com=0D=0A x-mozilla-cpt:;-1 end:vcard
